plugins: use require() to hook into dojo

master
Andrew Dolgov 8 years ago
parent fd539f2800
commit f6d2787a8e

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

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

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

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

Loading…
Cancel
Save