Interwiki Custom Inc End

</style>

<!— Branches' info —>
<script type="text/javascript" src="http://topia.wikidot.com/local--code/php-interwiki-test/4"></script>

<!— PageLookupQModule —>
<script type="text/javascript" src="http://topia.wdfiles.com/local--code/getwikimodule/1"></script>

<meta name="viewport" content="width=device-width,initial-scale=1">

</head>

<body>
<div id="output"></div>

<script type="text/javascript">
function id(v) {return document.getElementById(v);}

var IntKeys = Object.keys(IntData);

var getURL;
var elem = id("output"),
inStyle = id("inStyle");
var thisSite= IntData[siteLang];
var siteID = thisSite ? thisSite["id"] : false;
var pagename = "%%fullname%%".split(thisSite["category"]).join("");
/* test */
if(test_mode) {pagename = "scp-173";}

var header = thisSite["head"];

/* FIRE! */

function getDataAll(){
function af(v) {return v < 10 ? "0" + v : v}
var a = new Date(),
ay = a.getFullYear(),
amo = af(a.getMonth() + 1),
ad = af(a.getDate()),
ah = af(a.getHours()),
ami = af(a.getMinutes()),
as = af(a.getSeconds()),
time = ay + "/" + amo + "/" + ad + " " + ah + ":" + ami + ":" + as;
elem.innerHTML += '<div class="head"><a class="head_link" onclick="window.location.reload(true);" title="Click and Reload ' + "(last update: " + time + ')">' + header + '</a></div>';
for(var i = 0; i < IntKeys.length; i++) {
var obj = IntData[IntKeys[i]];
if(siteID !== obj["id"]) {
getData(obj["url"], obj["name"], obj["id"], obj["title"], obj["category"] + pagename, IntKeys[i], obj["sp"]);
}
}
for(var i = 0; i < 6; i++) {
setTimeout(elemSort, 1000 * i + 1000);
}
}

function getData(a, b, c, d, e, f, g){
getWikiModule({
site_id: c,
query: e,
function: function(res) {
for(var i = 0; i < res.length; i++) {
if(res[i].unix_name == e) {
g = ‘ data-o="` + (g ? g : "official") + `"`;
elem.innerHTML += ’<div' + g + ' class="ct-' + f + '"><a href="' + a + e + '" title="' + res[i].title + " (" + d + ')" target="_parent">' + b + '</a></div>';
}
}
}
});
}

var sortList, sortAry;
function elemSort() {
try{
sortList = document.querySelectorAll('[class*="ct-"]');
sortAry = Array.prototype.slice.call(sortList);
function compareText(a,b) {
function nm(v) {return v.className.replace("ct-", "");}
function idx(v) {return IntKeys.indexOf(v);}
if(idx(nm(a)) > idx(nm(b))) {
return 1;
}
else if(idx(nm(a)) < idx(nm(b))) {
return -1;
}
else {
return 0;
}
}
sortAry.sort(compareText);
for (var i = 0; i < sortAry.length; i++) {
elem.appendChild(elem.removeChild(sortAry[i]))
}
}catch(e){}
}

getDataAll();
</script>
</body>
[[/html]]

[[/module]]

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License