MediaWiki:Gadget-WhatIsThat.js
Görünüm
Not: Sayfayı kaydettikten sonra değişiklikleri görebilmek için tarayıcınızın önbelleğinizi temizlemeniz gerekir. Google Chrome, Firefox, Microsoft Edge ve Safari: ⇧ Shift tuşuna basılı tutun ve Yeniden Yükle araç çubuğu düğmesine tıklayın. Ayrıntılar ve diğer tarayıcılara yönelik yönergeler için Vikipedi:Önbelleğinizi atlayın sayfasını inceleyin.
if ( mw.config.get('wgNamespaceNumber') == 6 ) $(whatisthat) ;
function whatisthat_open_html_window ( html ) {
html = decodeURIComponent ( html ) ;
html = unescape ( html ) ;
OpenWindow=window.open("", "newwin", "height=550, width=800,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,status=no") ;
OpenWindow.document.write("<TITLE>" + mw.config.get('wgTitle') + "</TITLE>") ;
OpenWindow.document.write("<BODY>") ;
OpenWindow.document.write( html ) ;
OpenWindow.document.write("</BODY>") ;
OpenWindow.document.write("</HTML>") ;
OpenWindow.document.close() ;
self.name="main" ;
return false ;
}
function whatisthat_call () {
s = whatisthat_get_descriptions() ; // This function is included from the toolserver!
whatisthat_open_html_window ( "<pre>" + s + "</pre>" ) ;
}
function whatisthat () {
document.write('<script type="text/javascript" src="http://tools.wikimedia.de/~magnus/whatisthat.php?onlynew&raw&js&image='+encodeURIComponent(mw.config.get('wgPageName'))+'"><\/script>');
addLink('p-tb', 'javascript:whatisthat_call()', "WhatIsThat?", 'whatisthat', 'Add new language desctiptions', null, null, '', 'en');
}