• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Changes

Jump to navigation Jump to search
no edit summary
Line 583: Line 583:  
         updateContent();
 
         updateContent();
 
         mw.hook("wikipage.content").add(updateContent);
 
         mw.hook("wikipage.content").add(updateContent);
 +
 +
function showPageSizeWarning() {
 +
var newpp = $(".mw-parser-output").contents().filter(function () { return this.nodeType === 8 && this.data.match(/Post‐expand include size: (\d+)\/(\d+) bytes/); });
 +
if (!newpp.length) return;
 +
var sizes = newpp[0].data.match(/Post‐expand include size: (\d+)\/(\d+) bytes/);
 +
var usage = +sizes[1] / +sizes[2];
 +
if (usage >= 0.95) {
 +
$('#content').prepend('<pre style="color: red; text-align: center;">Warning: post‐expand include size is over 95%</pre>');
 +
}
 +
}
 +
 +
showPageSizeWarning();
    
     });
 
     });
    
}(mediaWiki, jQuery));
 
}(mediaWiki, jQuery));
cssedit, gkautomate
7,064

edits

Navigation menu