plugins: use require() to hook into dojo

This commit is contained in:
Andrew Dolgov 2016-08-10 12:22:55 +03:00
parent fd539f2800
commit f6d2787a8e
4 changed files with 16 additions and 11 deletions

View File

@ -1,5 +1,5 @@
require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) {
dojo.addOnLoad(function () {
ready(function () {
PluginHost.register(PluginHost.HOOK_ARTICLE_RENDERED_CDM, function (row) {
if (row) {
console.log("af_zz_noautoplay!");
@ -37,7 +37,5 @@ require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) {
return true;
});
});
});

View File

@ -1,5 +1,7 @@
dojo.addOnLoad(function() {
updateTitle = function() {
document.title = "Tiny Tiny RSS";
};
require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) {
ready(function () {
updateTitle = function () {
document.title = "Tiny Tiny RSS";
};
});
});

View File

@ -1,4 +1,9 @@
dojo.addOnLoad(function() {
hash_set = function() { };
hash_get = function() { };
require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) {
ready(function () {
hash_set = function () {
};
hash_get = function () {
};
});
});

View File

@ -24,7 +24,7 @@ function expandSizeWrapper(id) {
require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) {
dojo.addOnLoad(function() {
ready(function() {
PluginHost.register(PluginHost.HOOK_ARTICLE_RENDERED_CDM, function(row) {
if (getInitParam('cdm_expanded')) {