summaryrefslogtreecommitdiff
path: root/lib/scripts/script.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/scripts/script.js')
-rw-r--r--lib/scripts/script.js128
1 files changed, 0 insertions, 128 deletions
diff --git a/lib/scripts/script.js b/lib/scripts/script.js
index caa2a107c..8db223d61 100644
--- a/lib/scripts/script.js
+++ b/lib/scripts/script.js
@@ -4,53 +4,6 @@ if ('function' === typeof jQuery && 'function' === typeof jQuery.noConflict) {
}
/**
- * Mark a JavaScript function as deprecated
- *
- * This will print a warning to the JavaScript console (if available) in
- * Firebug and Chrome and a stack trace (if available) to easily locate the
- * problematic function call.
- *
- * @param msg optional message to print
- */
-function DEPRECATED(msg){
- if(!window.console) return;
- if(!msg) msg = '';
-
- var func;
- if(arguments.callee) func = arguments.callee.caller.name;
- if(func) func = ' '+func+'()';
- var line = 'DEPRECATED function call'+func+'. '+msg;
-
- if(console.warn){
- console.warn(line);
- }else{
- console.log(line);
- }
-
- if(console.trace) console.trace();
-}
-
-/**
- * Construct a wrapper function for deprecated function names
- *
- * This function returns a wrapper function which just calls DEPRECATED
- * and the new function.
- *
- * @param func The new function
- * @param context Optional; The context (`this`) of the call
- */
-function DEPRECATED_WRAP(func, context) {
- return function () {
- DEPRECATED();
- return func.apply(context || this, arguments);
- }
-}
-
-/**
- * Some of these scripts were taken from wikipedia.org and were modified for DokuWiki
- */
-
-/**
* Some browser detection
*/
var clientPC = navigator.userAgent.toLowerCase(); // Get client info
@@ -66,87 +19,6 @@ if (clientPC.indexOf('opera')!=-1) {
}
/**
- * Handy shortcut to document.getElementById
- *
- * This function was taken from the prototype library
- *
- * @link http://prototype.conio.net/
- */
-function $() {
- DEPRECATED('Please use the JQuery() function instead.');
-
- var elements = new Array();
-
- for (var i = 0; i < arguments.length; i++) {
- var element = arguments[i];
- if (typeof element == 'string')
- element = document.getElementById(element);
-
- if (arguments.length == 1)
- return element;
-
- elements.push(element);
- }
-
- return elements;
-}
-
-/**
- * Simple function to check if a global var is defined
- *
- * @author Kae Verens
- * @link http://verens.com/archives/2005/07/25/isset-for-javascript/#comment-2835
- */
-function isset(varname){
- return(typeof(window[varname])!='undefined');
-}
-
-/**
- * Get the computed style of a node.
- *
- * @link https://acidmartin.wordpress.com/2008/08/26/style-get-any-css-property-value-of-an-object/
- * @link http://svn.dojotoolkit.org/src/dojo/trunk/_base/html.js
- */
-function gcs(node){
- if(node.currentStyle){
- return node.currentStyle;
- }else{
- return node.ownerDocument.defaultView.getComputedStyle(node, null);
- }
-}
-
-/**
- * Escape special chars in JavaScript
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
-function jsEscape(text){
- var re=new RegExp("\\\\","g");
- text=text.replace(re,"\\\\");
- re=new RegExp("'","g");
- text=text.replace(re,"\\'");
- re=new RegExp('"',"g");
- text=text.replace(re,'&quot;');
- re=new RegExp("\\\\\\\\n","g");
- text=text.replace(re,"\\n");
- return text;
-}
-
-/**
- * This function escapes some special chars
- * @deprecated by above function
- */
-function escapeQuotes(text) {
- var re=new RegExp("'","g");
- text=text.replace(re,"\\'");
- re=new RegExp('"',"g");
- text=text.replace(re,'&quot;');
- re=new RegExp("\\n","g");
- text=text.replace(re,"\\n");
- return text;
-}
-
-/**
* Prints a animated gif to show the search is performed
*
* Because we need to modify the DOM here before the document is loaded