summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2016-08-10 12:22:55 +0300
committerAndrew Dolgov <[email protected]>2016-08-10 12:22:55 +0300
commitf6d2787a8e139da6af412f87645402e0c193af01 (patch)
tree1f7c157410b0164aa5e1498c060f67a68606f036 /plugins
parentfd539f280058f2606ba6a59403287b824b6fd195 (diff)
plugins: use require() to hook into dojo
Diffstat (limited to 'plugins')
-rw-r--r--plugins/af_zz_noautoplay/init.js4
-rw-r--r--plugins/no_title_counters/init.js10
-rw-r--r--plugins/no_url_hashes/init.js11
-rw-r--r--plugins/shorten_expanded/init.js2
4 files changed, 16 insertions, 11 deletions
diff --git a/plugins/af_zz_noautoplay/init.js b/plugins/af_zz_noautoplay/init.js
index 3cf3a381c..45dfc55ab 100644
--- a/plugins/af_zz_noautoplay/init.js
+++ b/plugins/af_zz_noautoplay/init.js
@@ -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;
});
-
});
-
}); \ No newline at end of file
diff --git a/plugins/no_title_counters/init.js b/plugins/no_title_counters/init.js
index 9c16856a2..06edfb3ba 100644
--- a/plugins/no_title_counters/init.js
+++ b/plugins/no_title_counters/init.js
@@ -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";
+ };
+ });
});
diff --git a/plugins/no_url_hashes/init.js b/plugins/no_url_hashes/init.js
index a437a1f3e..fc4596724 100644
--- a/plugins/no_url_hashes/init.js
+++ b/plugins/no_url_hashes/init.js
@@ -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 () {
+ };
+ });
});
+
diff --git a/plugins/shorten_expanded/init.js b/plugins/shorten_expanded/init.js
index 899f8a54d..ffec6271d 100644
--- a/plugins/shorten_expanded/init.js
+++ b/plugins/shorten_expanded/init.js
@@ -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')) {