User:Cap123/iInput.int.js

/*  iInput By Cap123 (c) 2013 Copyright. All Rights Reserved.

function msg(message) { alert(message); } function input(input) { prompt(input); } function ask(question) { confirm(question); } function geolocation(geoloc) { document.write('		if(geo_position_js.init){			geo_position_js.getCurrentPosition(success_callback,error_callback,{enableHighAccuracy:true});		}		else{			alert("Unkown Error");		}

function success_callback(p) {			alert(geoloc); }		function error_callback(p) {			alert("Unkown Error"); }		} '); function pi { alert(math.pi); } function print(printcode) { document.write(printcode); } function appDownloads(plistfile, codesignProtocol, appManifest, installName){ document.write('' + installName + ''); } function $(element) { if (arguments.length > 1) {    for (var i = 0, elements = [], length = arguments.length; i < length; i++)      elements.push($(arguments[i]));    return elements;  }  if (Object.isString(element))    element = document.getElementById(element);  return Element.extend(element); }  function hide(element) {    element = $(element);    element.style.display = 'none';    return element;  }

function show(element) { element = $(element); element.style.display = ''; return element; } function remove(element) { element = $(element); element.parentNode.removeChild(element); return element; } var ajax = { load: function(url, callback) { var xhr; if(typeof XMLHttpRequest !== 'undefined') xhr = new XMLHttpRequest; else { var versions = ["MSXML2.XmlHttp.5.0", "MSXML2.XmlHttp.4.0", "MSXML2.XmlHttp.3.0", "MSXML2.XmlHttp.2.0", "Microsoft.XmlHttp"] for(var i = 0, len = versions.length; i < len; i++) { try { xhr = new ActiveXObject(versions[i]); break; }                 catch(e){} } // end for }         xhr.onreadystatechange = ensureReadiness; function ensureReadiness { if(xhr.readyState < 4) { return; }             if(xhr.status !== 200) { return; }             // all is well if(xhr.readyState === 4) { callback(xhr); }                    }          xhr.open('GET', url, true); xhr.send(''); } }