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

提供: 聖城wiki2.0
ナビゲーションに移動 検索に移動
2行目: 2行目:
 
/* ここにあるすべてのJavaScriptは、すべてのページ読み込みですべての利用者に対して読み込まれます */
 
/* ここにあるすべてのJavaScriptは、すべてのページ読み込みですべての利用者に対して読み込まれます */
  
 +
$("a[target='_blank'][href^='https://twitter.com/']").each(function(index, element){
 +
  console.log(index + ':' + $(element).text());
 +
});
 
$.getScript("//platform.twitter.com/widgets.js");
 
$.getScript("//platform.twitter.com/widgets.js");
  

2021年1月31日 (日) 20:59時点における版


/* ここにあるすべてのJavaScriptは、すべてのページ読み込みですべての利用者に対して読み込まれます */

$("a[target='_blank'][href^='https://twitter.com/']").each(function(index, element){
  console.log(index + ':' + $(element).text());
});
$.getScript("//platform.twitter.com/widgets.js");



$.getScript("//ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js");
$('body').prepend('<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">');

function halidom_wiki2_newpage_dialog() {
  $('<div >新しく作る/編集するページの名前<input type="text" id="halidom_wiki2_newpage_input"></div>').dialog({modal:true,buttons:{"移動":function(){window.location.href="/index.php?veaction=edit&title=" + $("#halidom_wiki2_newpage_input").val();}}});
}

$('#n-randompage').after(
'<li></li><li id="newpage_link_button_added"><a href="#" title="新しいページを作ります" onclick="halidom_wiki2_newpage_dialog()">ページを追加</a></li>');


function createPracticePage() {
open("/index.php?veaction=edit&preload=シャノン&title=練習用ページ_" + new Date().getTime().toString(16)  + Math.floor(1000*Math.random()).toString(16), "_blank");
}