summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorNathan Warner <[email protected]>2020-05-30 22:45:41 -0600
committerNathan Warner <[email protected]>2020-05-30 22:45:41 -0600
commitf8d96543de36dd2d9a223fd017b6c5f671ff3e6a (patch)
treed39e54107727f95d75fe92708806cf1d6dd6b02b /plugins
parentb39e615683dae2d9b08939b7fb131cb8607c8415 (diff)
Created hotkeys_force_top plugin
Renamed swap_jk to match new naming scheme.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/hotkeys_force_top/init.js6
-rw-r--r--plugins/hotkeys_force_top/init.php24
-rw-r--r--plugins/hotkeys_swap_jk/init.php (renamed from plugins/swap_jk/init.php)4
3 files changed, 32 insertions, 2 deletions
diff --git a/plugins/hotkeys_force_top/init.js b/plugins/hotkeys_force_top/init.js
new file mode 100644
index 000000000..8d6280fc9
--- /dev/null
+++ b/plugins/hotkeys_force_top/init.js
@@ -0,0 +1,6 @@
+require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) {
+ ready(function () {
+ Headlines.default_force_to_top = true;
+ });
+});
+
diff --git a/plugins/hotkeys_force_top/init.php b/plugins/hotkeys_force_top/init.php
new file mode 100644
index 000000000..faddc9148
--- /dev/null
+++ b/plugins/hotkeys_force_top/init.php
@@ -0,0 +1,24 @@
+<?php
+class Hotkeys_Force_Top extends Plugin {
+ private $host;
+
+ function about() {
+ return array(1.0,
+ "Force open article to the top",
+ "itsamenathan");
+ }
+
+ function init($host) {
+ $this->host = $host;
+
+ }
+
+ function get_js() {
+ return file_get_contents(__DIR__ . "/init.js");
+ }
+
+ function api_version() {
+ return 2;
+ }
+
+}
diff --git a/plugins/swap_jk/init.php b/plugins/hotkeys_swap_jk/init.php
index d85149ef3..b1e3dbe04 100644
--- a/plugins/swap_jk/init.php
+++ b/plugins/hotkeys_swap_jk/init.php
@@ -1,5 +1,5 @@
<?php
-class Swap_JK extends Plugin {
+class Hotkeys_Swap_JK extends Plugin {
private $host;
@@ -27,4 +27,4 @@ class Swap_JK extends Plugin {
return 2;
}
-} \ No newline at end of file
+}