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",...")
(No difference)

Revision as of 11:26, 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() {
	$(".main-list-container #most_popular ol li").each(function(){
		console.log($(this).children().length);
		$(this).contents().filter(function(){
			return this.nodeType !== 1;
		})
		.remove();
	})
}