|
|
| (同じ利用者による、間の10版が非表示) |
| 1行目: |
1行目: |
| /*
| |
| * 拡張型折りたたみ要素(EnhancedCollapsibleElements)
| |
| * 説明書:https://ja.wikipedia.org/wiki/Help:拡張型折りたたみ可能要素
| |
| */
| |
| importScript('MediaWiki:EnhancedCollapsibleElements.js');
| |
|
| |
| /**
| |
| * Collapsible tables *********************************************************
| |
| *
| |
| * Description: Allows tables to be collapsed, showing only the header. See
| |
| * [[Vikipedia:NavFrame]].
| |
| * Maintainers: [[User:SupernovaT]]
| |
| */
| |
|
| |
| window.autoCollapse = 2;
| |
| window.collapseCaption = "隠す";
| |
| window.expandCaption = "表示";
| |
|
| |
| window.collapseTable = function ( tableIndex ) {
| |
| var Button = document.getElementById( 'collapseButton' + tableIndex );
| |
| var Table = document.getElementById( 'collapsibleTable' + tableIndex );
| |
|
| |
| if ( !Table || !Button ) {
| |
| return false;
| |
| }
| |
|
| |
| var Rows = Table.rows;
| |
| var i;
| |
|
| |
| if ( Button.firstChild.data === collapseCaption ) {
| |
| for ( i = 1; i < Rows.length; i++ ) {
| |
| Rows[i].style.display = 'none';
| |
| }
| |
| Button.firstChild.data = expandCaption;
| |
| } else {
| |
| for ( i = 1; i < Rows.length; i++ ) {
| |
| Rows[i].style.display = Rows[0].style.display;
| |
| }
| |
| Button.firstChild.data = collapseCaption;
| |
| }
| |
| };
| |
|
| |
| window.createCollapseButtons = function() {
| |
| var tableIndex = 0;
| |
| var NavigationBoxes = {};
| |
| var Tables = document.getElementsByTagName( 'table' );
| |
| var i;
| |
|
| |
| function handleButtonLink( index, e ) {
| |
| window.collapseTable( index );
| |
| e.preventDefault();
| |
| }
| |
|
| |
| for ( i = 0; i < Tables.length; i++ ) {
| |
| if ( $( Tables[i] ).hasClass( 'collapsible' ) ) {
| |
|
| |
| // ==UserScript==
| |
| // -*- mode:JScript; Encoding:utf8n -*-
| |
| // @name Vikipedia.citePopup
| |
| // @description Add pop-up on reference to footnote
| |
| // @include http://2ch.me/vikipedia/
| |
| // @grant none
| |
| //
| |
| // @author elti
| |
| // @version 2016.1.7
| |
| // ==/UserScript==
| |
|
| |
| (function () {
| |
|
| |
| // retrive array of cites
| |
| var cites = new Array();
| |
| var lis = document.getElementsByTagName("li");
| |
| for (var i=0; i < lis.length; i++){
| |
| var li = lis[i];
| |
| if (li.id.match(/^cite_note(?:-[\w\.]+){0,}-(\d+)$/)){
| |
| var index = RegExp.$1;
| |
| cites[index] = li;
| |
| }
| |
| }
| |
|
| |
| // retrive and modify reference element
| |
| var hrefs = document.getElementsByTagName("a");
| |
| for (var i=0; i < hrefs.length; i++){
| |
| var a = hrefs[i];
| |
| if (a.href.match(/#cite_note(?:-[\w\.]+){0,}-(\d+)$/)){
| |
| var index = RegExp.$1;
| |
| if (typeof a.textContent != "undefined") {
| |
| a.title = cites[index].textContent.replace(/^[^]\s*/, "");
| |
| } else {
| |
| a.title = cites[index].innerText.replace(/^[^]\s*/, "");
| |
| }
| |
| }
| |
| }
| |
|
| |
| })();
| |
|
| |
|
| |
| // == UserHeat == | | // == UserHeat == |
| (function(add, cla){window['UserHeatTag']=cla;window[cla]=window[cla]||function(){(window[cla].q=window[cla].q||[]).push(arguments)},window[cla].l=1*new Date();var ul=document.createElement('script');var tag = document.getElementsByTagName('script')[0];ul.async=1;ul.src=add;tag.parentNode.insertBefore(ul,tag);})('//uh.nakanohito.jp/uhj2/uh.js', '_uhtracker');_uhtracker({id:'uhxScATTSI'}); | | (function(add, cla){window['UserHeatTag']=cla;window[cla]=window[cla]||function(){(window[cla].q=window[cla].q||[]).push(arguments)},window[cla].l=1*new Date();var ul=document.createElement('script');var tag = document.getElementsByTagName('script')[0];ul.async=1;ul.src=add;tag.parentNode.insertBefore(ul,tag);})('//uh.nakanohito.jp/uhj2/uh.js', '_uhtracker');_uhtracker({id:'uhxScATTSI'}); |
// == UserHeat ==
(function(add, cla){window['UserHeatTag']=cla;window[cla]=window[cla]||function(){(window[cla].q=window[cla].q||[]).push(arguments)},window[cla].l=1*new Date();var ul=document.createElement('script');var tag = document.getElementsByTagName('script')[0];ul.async=1;ul.src=add;tag.parentNode.insertBefore(ul,tag);})('//uh.nakanohito.jp/uhj2/uh.js', '_uhtracker');_uhtracker({id:'uhxScATTSI'});