Board Thread:Script Suggestions/@comment-24531999-20151104231038/@comment-24473195-20160624232607

King Dragonhoff wrote: How do I test to see if it works? It does not seem to be changing the actual text in the address bar. I was recently in need of this, and tested it out on a page and realized it doesn't work at all. Here's an actual working version:

Replace this: function purgePage { var page = encodeURIComponent( mw.config.get( 'wgPageName' ) ); $.get( '/index.php?title=' + page + '&action=purge', function {            location.reload( true );        } ); $('html,body').css( {           display: 'block',            overflow: 'hidden'        } ); $( ' ' ).appendTo( document.body ) .css( 'height', $( window ).height ); }

With: function purgePage { window.location.href = window.location.href + (location.search==='' ? '?' : '&') + "debug=1"; }