|
/* Any JavaScript here will be loaded for all users on every page load. */
$( document ).ready(function () { ▼
/* Script for filtering mediawiki tables*/ ▼
importScript('MediaWiki:FilterTable.js'); ▼
$('pre').each(function () { ▼
/* Mark up pre's with box or pointer /* ▼
/* importScript('MediaWiki:PreMarkup.js'); /* ▼
▲$(document).ready(function () {
▲ $('pre').each(function () {
var $this = $(this)
var OriginalText = $this.html();
$this.parent(".mw-collapsible-content").show(); /// temporary show collapsible content to read its location.... ▼
$this.parent().parent(".mw-collapsible-content").show(); /// temporary show collapsible content to read its location.... ▼
▲ $this.parent(".mw-collapsible-content").show(); /// temporary show collapsible content to read its location....
function returnBoxedText(match, p1) { return '' + p1 + ''; } ▼
▲ $this.parent().parent(".mw-collapsible-content").show(); /// temporary show collapsible content to read its location....
function returnSpanPosStr(match, p1) { ▼
▲ function returnBoxedText(match, p1) { return '' + p1 + ''; }
▲ function returnSpanPosStr(match, p1) {
MarginTop = 5; case "":
MarginLeft MarginTop = 5;
Rotation MarginLeft = 2255;
break Rotation = 225;
case "-tr": break;
MarginTop = 5; case "-tr":
MarginLeft MarginTop = 5;
Rotation MarginLeft = 2255;
break Rotation = 225;
case "-br": break;
MarginTop = 20; case "-br":
MarginLeft MarginTop = 020;
Rotation MarginLeft = 3150;
break Rotation = 315;
break;
case "-bl": break;
MarginTop = 10; case "-bl":
MarginLeft MarginTop = -510;
Rotation MarginLeft = 45-5;
break Rotation = 45;
case "-tl": break;
MarginTop = 0; case "-tl":
MarginLeft MarginTop = -50;
Rotation MarginLeft = 135-5;
break Rotation = 135;
} break;
return '<point-here class="pre-arrow" orientation="' + p1 + '" style="position:absolute; maring-left: ' + MarginLeft + 'px; margin-top: ' + MarginTop + 'px; transform: rotate(' + Rotation + 'deg); transform-origin: 0% 0%;"> </point-here>';
}
}
var newText = OriginalText.replace(/<box>(.*)<\/box>/g, returnBoxedText);
newText = newText.replace(/<point-here(\S*)>/g, returnSpanPosStr);
$this.html(newText);
$this.find('box').each(function () {
posTop = $(this).position().top - 3;
posLeft = $(this).position().left - 3;
boxWidth = $(this).width();
$this.append( '<div style="padding:1px; padding-left:2px; border: 2px solid red; border-radius: 5px; box-shadow: 0.5px 0.5px 5px 0.5px red; position: absolute; left: ' + posLeft + 'px; top: ' + posTop + 'px; width:' + boxWidth + 'px;"> </div>' );
});
});
} );
} );
▲/* Script for filtering mediawiki tables*/
▲importScript('MediaWiki:FilterTable.js');
▲/* Mark up pre's with box or pointer /* /
▲/* importScript('MediaWiki:PreMarkup.js'); /* /
|