Difference between revisions of "MediaWiki:Common.js"
From Tycoon Gaming
(Testing) |
|||
Line 1: | Line 1: | ||
mw.loader.load( '/wiki/index.php?title=MediaWiki:ServerList.js&action=raw&ctype=text/javascript'); | mw.loader.load( '/wiki/index.php?title=MediaWiki:ServerList.js&action=raw&ctype=text/javascript'); | ||
mw.loader.load( '/wiki/index.php?title=MediaWiki:ReplaceWordWithLink.js&action=raw&ctype=text/javascript'); | mw.loader.load( '/wiki/index.php?title=MediaWiki:ReplaceWordWithLink.js&action=raw&ctype=text/javascript'); | ||
+ | |||
+ | var path = window.location.href; | ||
+ | var path1 = 'https://dash.tycoon.community/wiki/index.php/User:Donald' | ||
+ | function iniFrame() { | ||
+ | if ( window.location !== window.parent.location ) | ||
+ | { | ||
+ | if (path == path1) { | ||
+ | var output; | ||
+ | window.element = document.getElementById("bodyContent"); | ||
+ | var save = window.element.innerHTML; | ||
+ | output = '<p>IFrame</p>' | ||
+ | window.element.innerHTML = save + output; | ||
+ | } | ||
+ | } else { | ||
+ | if (path == path1) { | ||
+ | var output; | ||
+ | window.element = document.getElementById("bodyContent"); | ||
+ | var save = window.element.innerHTML; | ||
+ | output = '<p>No IFrame</p>' | ||
+ | window.element.innerHTML = save + output; | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | iniFrame(); |
Revision as of 20:56, 10 October 2019
mw.loader.load( '/wiki/index.php?title=MediaWiki:ServerList.js&action=raw&ctype=text/javascript'); mw.loader.load( '/wiki/index.php?title=MediaWiki:ReplaceWordWithLink.js&action=raw&ctype=text/javascript'); var path = window.location.href; var path1 = 'https://dash.tycoon.community/wiki/index.php/User:Donald' function iniFrame() { if ( window.location !== window.parent.location ) { if (path == path1) { var output; window.element = document.getElementById("bodyContent"); var save = window.element.innerHTML; output = '<p>IFrame</p>' window.element.innerHTML = save + output; } } else { if (path == path1) { var output; window.element = document.getElementById("bodyContent"); var save = window.element.innerHTML; output = '<p>No IFrame</p>' window.element.innerHTML = save + output; } } } iniFrame();