「MediaWiki:Common.js」の版間の差分

提供: Yourpedia
移動: 案内検索
(テスト)
6行目: 6行目:
 
}
 
}
  
/* 計算スクリプト */
+
mw.loader.load( '/index.php?title=MediaWiki:Common.js/ParserFunctions.js‎&action=raw&ctype=text/javascript' );
var Keisans = document.getElementsByClassName('tashizan');
+
 
+
//END
var Childs;
+
var numA;
+
var numB;
+
var numC;
+
+
for(var i in Keisans){
+
Childs = Keisans[i].childNodes;
+
for(var i2 in Childs){
+
if(Childs[i2].className == 'numA') numA = Childs[i2].innerText;
+
if(Childs[i2].className == 'numB') numB = Childs[i2].innerText;
+
if(Childs[i2].className == 'numC') numC = Childs[i2];
+
+
if(numA && numB && numC){
+
numC.innerText = Number(numA) + Number(numB);
+
break;
+
}
+
}
+
}
+

2019年6月5日 (水) 18:18時点における版

/* Any JavaScript here will be loaded for all users on every page load. */

var isViewingMainPage = (/^メインページ(\/..)? - Yourpedia$/.test(document.title));
if (isViewingMainPage) {
  document.write('<style type="text/css">/*<![CDATA[*/ #lastmod, #siteSub, h1.firstHeading { display: none !important; } #content { padding-top: 1em; }/*]]>*/</style>');
}

mw.loader.load( '/index.php?title=MediaWiki:Common.js/ParserFunctions.js‎&action=raw&ctype=text/javascript' );

//END