Jelajahi Sumber

add no_url_hashes plugin

Andrew Dolgov 10 tahun lalu
induk
melakukan
9864c1362a
2 mengubah file dengan 29 tambahan dan 0 penghapusan
  1. 4 0
      plugins/no_url_hashes/init.js
  2. 25 0
      plugins/no_url_hashes/init.php

+ 4 - 0
plugins/no_url_hashes/init.js

@@ -0,0 +1,4 @@
+dojo.addOnLoad(function() {
+	hash_set = function() { };
+	hash_get = function() { };
+});

+ 25 - 0
plugins/no_url_hashes/init.php

@@ -0,0 +1,25 @@
+<?php
+class No_URL_Hashes extends Plugin {
+	private $host;
+
+	function about() {
+		return array(1.0,
+			"Disable URL hash usage (e.g. #f=10, etc)",
+			"fox");
+	}
+
+	function init($host) {
+		$this->host = $host;
+
+	}
+
+	function get_js() {
+		return file_get_contents(__DIR__ . "/init.js");
+	}
+
+	function api_version() {
+		return 2;
+	}
+
+}
+?>