user-upload
3,547
回編集
(折り畳みボックス用のスクリプト) |
(cookieのキー名を変更。+旧エケペディアへの言語間リンクを修正するコード) |
||
43行目: | 43行目: | ||
$table.find('tr:first > td:first').prepend($button); | $table.find('tr:first > td:first').prepend($button); | ||
if ( | if (/^cookie-(.+)$/.test(collapse)) { | ||
var key = ' | var key = 'collapse-' + RegExp.$1; | ||
collapse = $.cookie(key) || 'autocollapse'; | collapse = $.cookie(key) || 'autocollapse'; | ||
$toggle.on('click', $.proxy(toggleCollapsible, $toggle, $table, key)); | $toggle.on('click', $.proxy(toggleCollapsible, $toggle, $table, key)); | ||
56行目: | 56行目: | ||
}); | }); | ||
} | } | ||
makeCollapsibleBoxes | mw.hook('wikipage.content').add(makeCollapsibleBoxes); | ||
/*旧エケペディアへの言語間リンクで「_」を「%20」に変換する*/ | |||
$('#p-lang a[lang=akb49]').attr('href', function(i, href) { return href.replace('_', '%20', 'g'); }); |