MediaWiki:PreMarkup.js: Difference between revisions

Content deleted Content added
No edit summary
Tag: Reverted
Undo revision 17021 by Caleb Cooper (talk)
Tag: Undo
Line 1:
$( document ).ready(function () {
 
$('pre').each(function () {
 
var $this = $(this)
 
var OriginalText = $this.html();
 
var $this = $(this)
$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....
 
var OriginalText = $this.html();
function returnBoxedText(match, p1) { return '' + p1 + ''; }
function returnSpanPosStr(match, p1) {
var MarginTop = 0;
var MarginLeft = 0;
var Rotation = 0;
switch (p1) {
 
 
$this.parent(".mw-collapsible-content").show(); /// temporary show collapsible content to read its location....
case "":
 
MarginTop = 5;
function returnBoxedText(match, p1) { return '<box>' + p1 + '</box>'; }
MarginLeft = 5;
function returnSpanPosStr(match, p1) {
Rotation = 225;
var MarginTop = 0;
break;
case "-tr": var MarginLeft = 0;
var Rotation = 0;
MarginTop = 5;
switch (p1) {
MarginLeft = 5;
 
Rotation = 225;
break;
case "-br":
MarginTop = 205;
MarginLeft = 05;
Rotation = 315225;
break;
break; case "-tr":
case "-bl": MarginTop = 5;
MarginTop MarginLeft = 105;
MarginLeft Rotation = -5225;
Rotation = 45 break;
break; case "-br":
case "-tl": MarginTop = 20;
MarginTop MarginLeft = 0;
MarginLeft Rotation = -5315;
Rotation = 135 break;
break;
} case "-bl":
MarginTop = 510;
var MarginLeft = 0-5;
Rotation = 22545;
Rotation = 225 break;
case "-tl":
MarginTop = 50;
MarginLeft = -5;
MarginLeft Rotation = 5135;
break;
break; }
 
 
Line 60 ⟶ 62:
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;">&nbsp</div>' );
});
 
 
 
});
 
});