Created by:
7happy7
Special Thanks:Boyu12,
C-take
~ rev.273: Non ULI
rev.274 ~: All
todo: ULI main-page (/main)
Note:
DO NOT USE TWO OR MORE THIS MODULE ON A SINGLE PAGE!
iframe
[[embed]]
<iframe src="http://topia.wikidot.com/local--code/php-interwiki/1#fr?scp-173" class="html-block-iframe" style="width: 100%; height: 0px; overflow-y: hidden;" name="php_int"></iframe>
[[/embed]]
[[div style="display: none;"]]
[[embed]]
<iframe src="http://topia.wikidot.com/local--code/php-interwiki/2#38a?057" name="colorFrame"></iframe>
[[/embed]]
[[/div]]
scp-173 (SCP-FR ver)
Click language-header(Dans d’autres langues) and reload the Interwiki.
[[include]]
[[include :topia:php-interwiki-colorchange |link=38a|header=057]]
[[include :topia:php-interwiki-inc |lang=en]]1
lang: "int", "cn", "en", "fr", "de", "it", "jp", "ko", "pl", "ptbr", "ru", "es", "th", "ua", "cs", "nd", "zhtr", "tr", "vn", "uli"
<head> <link href="https://use.fontawesome.com/releases/v5.6.1/css/all.css" rel="stylesheet"> <link href="http://topia.wikidot.com/local--code/php-interwiki/3" rel="stylesheet"> <style>body {-webkit-text-size-adjust: 105%;font-family: verdana,arial,helvetica,sans-serif;font-size: 0.8em;max-height: 230px; overflow-y: hidden;margin: 0;}.head {border-bottom: solid 1px #600;padding-left: 15px;margin-top: 10px;margin-bottom: 5px;font-size: 8pt;font-weight: bold;}a.head_link {color: #600;}a.head_link:hover {text-decoration: none;}pre {display: inline; font-weight: bold;}a {color: #b01; font-weight: bold; text-decoration: none; line-height: 125%; cursor: pointer;}a:hover {text-decoration: underline;}div[class*="ct-"] > a > span:not([class]):not([style]) {font-size: .7em;}</style> <style id="inStyle"></style> <script type="text/javascript" src="http://shitake-crude-production.wdfiles.com/local--code/abbreviation-library/1"></script> <!-- C-take's resizing iframe method --> <script type="text/javascript" src="http://shitake-crude-production.wdfiles.com/local--code/extension%3Aifarame-htmlblock/1"></script> <meta name="viewport" content="width=device-width,initial-scale=1"> </head> <body> <div id="output"></div> <script type="text/javascript"> /* lists */ var headList = ["Languages", "Languages", "其他语言", "Dans d’autres langues", "In anderen Sprachen", "In altre lingue", "他言語版", "다른 언어", "W innych językach", "Em outros idiomas", "На других языках", "En otros idiomas", "ภาษาอื่น", "Іншими мовами", "V jiných jazycích", "På andre sprog/Onnur mál/På andre språk/Språk", "其他語言", "Diğer diller", "Ngôn ngữ khác", "Languages"]; var langList = ["English", "International", "中文", "Français", "Deutsch", "Italiano", "日本語", "한국어", "Polski", "Português", "Русский", "Español", "ภาษาไทย", "Українська", "Čeština", "Nordic", "繁体中文", "Türkçe", "Tiếng Việt", "ULI"]; var ISOlist = ["en", "int", "cn", "fr", "de", "it", "jp", "ko", "pl", "ptbr", "ru", "es", "th", "ua", "cs", "nd", "zhtr", "tr", "vn", "uli"]; var URLlist = ["http://www.scp-wiki.net/", "http://scp-int.wikidot.com/", "http://scp-wiki-cn.wikidot.com/", "http://fondationscp.wikidot.com/", "http://scp-wiki-de.wikidot.com/", "http://fondazionescp.wikidot.com/", "http://ja.scp-wiki.net/", "http://ko.scp-wiki.net/", "http://scp-wiki.net.pl/", "http://scp-pt-br.wikidot.com/", "http://scpfoundation.net/", "http://lafundacionscp.wikidot.com/", "http://scp-th.wikidot.com/", "http://scp-ukrainian.wikidot.com/", "http://scp-cs.wikidot.com/", "http://scp-nd.wikidot.com/", "http://scp-zh-tr.wikidot.com/", "http://scpvakfi.wikidot.com/", "http://scp-vn.wikidot.com/", "http://scp-un.wikidot.com/"]; var titleList = ["Main wiki (English)", "International Translation Archive (English)", "SCP-CN (Chinese)", "SCP-FR (French)", "SCP-DE (German)", "SCP-IT (Italian)", "SCP-JP (Japanese)", "SCP-KO (Korean)", "SCP-PL (Polish)", "SCP-PT/BR (Portuguese)", "SCP-RU (Russian)", "SCP-ES (Spanish)", "SCP-TH (Thai)", "SCP-UA (Ukrainian)", "SCP-CS (Czech)", "SCP-ND - Unofficial (Danish, Faroese, Norwegian, Swedish)", "SCP-ZH-TR - Unofficial (Traditional Chinese)", "SCP-TR - Unofficial (Turkish)", "SCP-VN - Unofficial (Vietnamese)", "Underrepresented Languages Incubator"]; var IDlist = ["66711", "1427610", "530812", "464696", "1269857", "530167", "578002", "486864", "647733", "783633", "169125", "560484", "547203", "1398197", "2060442", "1590804", "3947998", "1431627", "836589", "2509180"]; var ulLang = ["Ελληνικά", "Esperanto", "Magyar", "Bahasa Indonesia", "Ido", "Lietuvių", "Nederlands", "Српски / Srpski", "粵語", "Simple English", "Cuengh", "Latviešu", ""]; var ulList = ["el", "eo", "hu", "id", "io", "lt", "nl", "sr", "yue", "simple", "za", "lv", ""]; var ulTitle = [" (Greek)", " (Esperanto)", " (Hungarian)", " (Indonesian)", " (Ido)", " (Lithuanian)", " (Dutch)", " (Serbian)", " (Cantonese)", " (Simple English)", " (Zhuang)", " (Latvian)", ""]; var thisUlLang; var siteID, header, getURL, linkC, headC; var elem = _abb.id("output"), inStyle = _abb.id("inStyle"); var baseURL = _abb.hash.split("?"); var siteLang = baseURL[0]; if(ISOlist.indexOf(siteLang) == -1) { siteID = "dummy"; }else { siteID = IDlist[ISOlist.indexOf(siteLang)]; } var pagename = baseURL[1]; if(pagename.match(/da:|fo:|no:|sv:/g) && siteID == "1590804") { pagename = pagename.split(/da:|fo:|no:|sv:/g).join(""); } else if(pagename.match(/el:|eo:|hu:|id:|io:|lt:|nl:|sr:|yue:|simple:|za:|lv:/g) && siteID == "2509180") { thisUlLang = pagename.replace(/(el:|eo:|hu:|id:|io:|lt:|nl:|sr:|yue:|simple:|za:|lv:)/g, "$1").split(":").join(''); pagename = pagename.split(/el:|eo:|hu:|id:|io:|lt:|nl:|sr:|yue:|simple:|za:|lv:/g).join(""); } /* FIRE! */ getDataAll(); /* functions based on boyu12's code edited by 7happy7 */ function getDataAll(){ if(siteID == "dummy") { header = "Invalid language"; }else { header = headList[IDlist.indexOf(siteID)]; } elem.innerHTML += '<div class="head"><a class="head_link" onclick="window.location.reload(true);" title="Click and Reload ' + _abb.time("(last update: %year/%month/%day %hour:%min:%sec)") + '">' + header + '</a></div>'; for(var i = 0; i < IDlist.length; i++) { getDataVia(URLlist[i], langList[i], IDlist[i], titleList[i], pagename, true); } for(var i = 0; i < 6; i++) { setTimeout(elemSort, 1000 * i + 1000); } } var splitUliArticleSym; function getDataVia(a, b, c, d, e, async){ if(c == "2509180") { for(var i2 = 0; i2 < ulList.length; i2++) { if(thisUlLang !== ulList[i2]) { if(ulList[i2] !== "") {splitUliArticleSym = ":";}else{splitUliArticleSym = ""} getURL = "/quickmodule.php?module=PageLookupQModule&q=" + ulList[i2] + splitUliArticleSym + e + "&s=" + c; getData(a, ulLang[i2], c, "Underrepresented Languages Incubator" + ulTitle[i2], ulList[i2] + ":" + e, async); } } }else { getURL = "/quickmodule.php?module=PageLookupQModule&q=" + e + "&s=" + c; getData(a, b, c, d, e, async); } } function getData(a, b, c, d, e, async){ var xhr = _abb.xhr(); if(!xhr){ alert("XHR is not supported");return; } xhr.onreadystatechange = function(){ if(xhr.readyState==4){ if(xhr.status!=200){ return; } try{ var jsonData = JSON.parse(xhr.responseText); for(var i = 0; i < jsonData.pages.length; i++) { if(jsonData.pages[i].unix_name == e && (siteID !== c || siteID == "2509180")) { elem.innerHTML += '<div class="ct-' + c + '"><a href="' + a + e + '" title="' + d + '" target="_parent">' + b + '</a></div>'; } } }catch(e){} } }; xhr.open("GET", getURL, async); xhr.send(); } var sortList, sortAry; function elemSort() { try{ sortList = _abb.css('[class*="ct-"]'); sortAry = Array.prototype.slice.call(sortList); function compareText (a,b) { if (IDlist.indexOf(a.className.replace("ct-", "")) > IDlist.indexOf(b.className.replace("ct-", ""))) { return 1; } else if (IDlist.indexOf(a.className.replace("ct-", "")) < IDlist.indexOf(b.className.replace("ct-", ""))) { return -1; } else { return 0; } } sortAry.sort(compareText); for (var i = 0; i < sortAry.length; i++) { elem.appendChild(elem.removeChild(sortAry[i])) } }catch(e){} } /* changing color */ function changeColor(x, y){ inStyle.innerHTML = '#output a {color: #' + x + ';} #output div[class*="ct-"]:before {color: #' + x + ';} #output .head {border-color: #' + y + ';} #output .head_link {color: #' + y + ';}'; } function changeColorFire() { try{ var targetSource = _abb.pWin.colorFrame.location.href; var ccURL = decodeURI(targetSource).split("#")[1].split("?"); var lc = ccURL[0]; var hc = ccURL[1]; for(var i = 0; i < 4; i++) { setTimeout(changeColor(lc, hc), 1000 * i); } }catch(e){} } changeColorFire(); </script> <div id="iframeset"></div> </body>
<head> </head> <body> <script type="text/javascript"> var baseURL = decodeURI(window.location.href).split("#")[1].split("?"); var lc = baseURL[0]; var hc = baseURL[1]; function sendColor() { try{ var check = window.parent.window.php_int; check.onload = function() { check.changeColor(lc, hc); } }catch(e){} } sendColor(); </script> </body>
div[class*="ct-"]:before { content: "\f02d"; color: #b01; position: relative; width: 2em; display: inline-block; text-align: center; bottom: 0.1em; font-family:"Font Awesome 5 Free"; font-size: 0.6em; font-weight: 900; text-rendering: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; transform: translate(0, 0); } /* INT, ULI */ #output div.ct-1427610:before, #output div.ct-2509180:before { content: "\f0ac"; } /* home */ #output div.ct-66711:before { content: "\f015"; } /* Unofficial */ #output div.ct-1431627:before, #output div.ct-836589:before, #output div.ct-3947998:before, #output div.ct-1590804:before { content: "\f4ad"; transform: translate(0, 0) rotateY(180deg); }
<head> <link href="https://use.fontawesome.com/releases/v5.6.1/css/all.css" rel="stylesheet"> <link href="http://topia.wikidot.com/local--code/php-interwiki/3" rel="stylesheet"> <style>body {-webkit-text-size-adjust: 105%;font-family: verdana,arial,helvetica,sans-serif;font-size: 0.8em;max-height: 230px; overflow-y: hidden;margin: 0;}.head {border-bottom: solid 1px #600;padding-left: 15px;margin-top: 10px;margin-bottom: 5px;font-size: 8pt;font-weight: bold;}a.head_link {color: #600;}a.head_link:hover {text-decoration: none;}pre {display: inline; font-weight: bold;}a {color: #b01; font-weight: bold; text-decoration: none; line-height: 125%; cursor: pointer;}a:hover {text-decoration: underline;}div[class*="ct-"] > a > span:not([class]):not([style]) {font-size: .7em;}</style> <style id="inStyle"></style> <script type="text/javascript" src="http://shitake-crude-production.wdfiles.com/local--code/abbreviation-library/1"></script> <!-- C-take's resizing iframe method --> <script type="text/javascript" src="http://shitake-crude-production.wdfiles.com/local--code/extension%3Aifarame-htmlblock/1"></script> <meta name="viewport" content="width=device-width,initial-scale=1"> </head> <body> <div id="output"></div> <script type="text/javascript"> /* lists */ var headList = ["Languages", "Languages", "其他语言", "Dans d’autres langues", "In anderen Sprachen", "In altre lingue", "他言語版", "다른 언어", "W innych językach", "Em outros idiomas", "На других языках", "En otros idiomas", "ภาษาอื่น", "Іншими мовами", "V jiných jazycích"]; var langList = ["English", "International", "中文", "Français", "Deutsch", "Italiano", "日本語", "한국어", "Polski", "Português", "Русский", "Español", "ภาษาไทย", "Українська", "Čeština"]; var ISOlist = ["en", "int", "cn", "fr", "de", "it", "jp", "ko", "pl", "ptbr", "ru", "es", "th", "ua", "cs"]; var URLlist = ["http://www.scp-wiki.net/", "http://scp-int.wikidot.com/", "http://scp-wiki-cn.wikidot.com/", "http://fondationscp.wikidot.com/", "http://scp-wiki-de.wikidot.com/", "http://fondazionescp.wikidot.com/", "http://ja.scp-wiki.net/", "http://ko.scp-wiki.net/", "http://scp-wiki.net.pl/", "http://scp-pt-br.wikidot.com/", "http://scpfoundation.net/", "http://lafundacionscp.wikidot.com/", "http://scp-th.wikidot.com/", "http://scp-ukrainian.wikidot.com/", "http://scp-cs.wikidot.com/"]; var titleList = ["Main wiki (English)", "International Translation Archive (English)", "SCP-CN (Chinese)", "SCP-FR (French)", "SCP-DE (German)", "SCP-IT (Italian)", "SCP-JP (Japanese)", "SCP-KO (Korean)", "SCP-PL (Polish)", "SCP-PT/BR (Portuguese)", "SCP-RU (Russian)", "SCP-ES (Spanish)", "SCP-TH (Thai)", "SCP-UA (Ukrainian)", "SCP-CS (Czech)"]; var IDlist = ["66711", "1427610", "530812", "464696", "1269857", "530167", "578002", "486864", "647733", "783633", "169125", "560484", "547203", "1398197", "2060442"]; var siteID, header, getURL, linkC, headC; var elem = _abb.id("output"), inStyle = _abb.id("inStyle"); var baseURL = _abb.hash.split("?"); var siteLang = baseURL[0]; if(ISOlist.indexOf(siteLang) == -1) { siteID = "dummy"; }else { siteID = IDlist[ISOlist.indexOf(siteLang)]; } var pagename = baseURL[1]; /* FIRE! */ getDataAll(); /* functions based on boyu12's code edited by 7happy7 */ function getDataAll(){ if(siteID == "dummy") { header = "Invalid language"; }else { header = headList[IDlist.indexOf(siteID)]; } elem.innerHTML += '<div class="head"><a class="head_link" onclick="window.location.reload(true);" title="Click and Reload ' + _abb.time("(last update: %year/%month/%day %hour:%min:%sec)") + '">' + header + '</a></div>'; for(var i = 0; i < IDlist.length; i++) { getDataVia(URLlist[i], langList[i], IDlist[i], titleList[i], pagename, true); } for(var i = 0; i < 6; i++) { setTimeout(elemSort, 1000 * i + 1000); } } function getDataVia(a, b, c, d, e, async){ getURL = "/quickmodule.php?module=PageLookupQModule&q=" + e + "&s=" + c; getData(a, b, c, d, e, async); } function getData(a, b, c, d, e, async){ var xhr = _abb.xhr(); if(!xhr){ alert("XHR is not supported");return; } xhr.onreadystatechange = function(){ if(xhr.readyState==4){ if(xhr.status!=200){ return; } try{ var jsonData = JSON.parse(xhr.responseText); for(var i = 0; i < jsonData.pages.length; i++) { if(jsonData.pages[i].unix_name == e && siteID !== c) { elem.innerHTML += '<div class="ct-' + c + '"><a href="' + a + e + '" title="' + d + '" target="_parent">' + b + '</a></div>'; } } }catch(e){} } }; xhr.open("GET", getURL, async); xhr.send(); } var sortList, sortAry; function elemSort() { try{ sortList = _abb.css('[class*="ct-"]'); sortAry = Array.prototype.slice.call(sortList); function compareText (a,b) { if (IDlist.indexOf(a.className.replace("ct-", "")) > IDlist.indexOf(b.className.replace("ct-", ""))) { return 1; } else if (IDlist.indexOf(a.className.replace("ct-", "")) < IDlist.indexOf(b.className.replace("ct-", ""))) { return -1; } else { return 0; } } sortAry.sort(compareText); for (var i = 0; i < sortAry.length; i++) { elem.appendChild(elem.removeChild(sortAry[i])) } }catch(e){} } /* changing color */ function changeColor(x, y){ inStyle.innerHTML = '#output a {color: #' + x + ';} #output div[class*="ct-"]:before {color: #' + x + ';} #output .head {border-color: #' + y + ';} #output .head_link {color: #' + y + ';}'; } function changeColorFire() { try{ var targetSource = _abb.pWin.colorFrame.location.href; var ccURL = decodeURI(targetSource).split("#")[1].split("?"); var lc = ccURL[0]; var hc = ccURL[1]; for(var i = 0; i < 4; i++) { setTimeout(changeColor(lc, hc), 1000 * i); } }catch(e){} } changeColorFire(); </script> <div id="iframeset"></div> </body>






