MediaWiki:Mobile.js: Difference between revisions
Content deleted Content added
Caleb Cooper (talk | contribs) m 1 revision imported |
Nick Parrott (talk | contribs) No edit summary |
||
Line 1:
/* [[Category:AutoDumpContentFromCommons]] */
/* Any JavaScript here will be loaded for all users on every page load. */
$(function( $ ) {
Line 7 ⟶ 8:
$('pre').each(function(){
var pointers =
var boxes =
var pointersI
var thisparent = $(this).parent('div');
var thisorigtext = $(this).html();
Line 19 ⟶ 21:
/* transform MW pointer anchors to full spans */
var newText = thisorigtext.replace(/<point-here>/g, '<span class="temp-mw-point-anchor" data-pos="bl"></span>');
/* transform MW box anchors to full spans */
/* set new PRE text, including custom spans */
Line 35 ⟶ 37:
if (pointers.length > 0 || boxes.length > 0) {
/* Place back original text without key-text */
Line 46 ⟶ 47:
if (pointers.length > 0) {
$( pointers ).each(function(){
var data =
data.top = $(this)[0].top;
data.left = data.rotation = 0;
| |||