User:Quarl/wistk.js
From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. In Internet Explorer and Firefox, hold down the Ctrl key and click the Refresh or Reload button. Opera users have to clear their caches through Tools→Preferences, see the instructions for Opera. Konqueror and Safari users can just click the Reload button.
// [[User:Quarl/wistk.js]] - dependency tracking // <pre><nowiki> // quarl 2006-02-07 initial version var wistk = new Object(); wistk.namespace = 'User:Quarl'; wistk.modules = {}; wistk.provide = function(s) { wistk.modules[s] = 1; } wistk.depend = function() { for (var i = 0; i < arguments.length; ++i) { if (!wistk.depend1(arguments[i])) return false; } return true; } wistk.depend1 = function(t) { if (wistk.modules[t]) return true; var s = wistk.namespace + '/' + t; document.write('<scr'+'ipt type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=' + s + '&action=raw&ctype=text/javascript&dontcountme=s"></scr'+'ipt>'); if (!wistk.modules[t]) { alert("WISTK: Error loading module '"+t+"'"); return false; } return true; } // </nowiki></pre>

