Actions

MediaWiki

Difference between revisions of "Common.js"

From

(Created page with "Any JavaScript here will be loaded for all users on every page load.: removeViews(); $(document).on("ready", function() { removeViews(); }) $(window).on("beforeunload",...")
 
 
Line 10: Line 10:
  
 
function removeViews() {
 
function removeViews() {
$(".main-list-container #most_popular ol li").each(function(){
+
$("#most_popular li").each(function(){
console.log($(this).children().length);
+
 
$(this).contents().filter(function(){
 
$(this).contents().filter(function(){
 
return this.nodeType !== 1;
 
return this.nodeType !== 1;

Latest revision as of 11:29, 9 March 2019

/* Any JavaScript here will be loaded for all users on every page load. */
removeViews();
$(document).on("ready", function() {
	removeViews();
})

$(window).on("beforeunload", function() {
	removeViews();
})

function removeViews() {
	$("#most_popular li").each(function(){
		$(this).contents().filter(function(){
			return this.nodeType !== 1;
		})
		.remove();
	})
}