Fandom Developers Wiki
(→‎Page turning white: new section)
(44 intermediate revisions by 25 users not shown)
Line 1: Line 1:
  +
{{tocright}}
__TOC__
 
 
 
== Redundant buttons ==
 
== Redundant buttons ==
   
Line 109: Line 108:
 
::You can probably fix this in your personal CSS. — <span style="font: bold 125% Garamond;">[[User:SpikeToronto|<span style="color:#DC143C">Spike</span>]][[User talk:SpikeToronto|<span style="color:#000000">Toronto</span>]]</span> 19:32, July 4, 2012 (UTC)
 
::You can probably fix this in your personal CSS. — <span style="font: bold 125% Garamond;">[[User:SpikeToronto|<span style="color:#DC143C">Spike</span>]][[User talk:SpikeToronto|<span style="color:#000000">Toronto</span>]]</span> 19:32, July 4, 2012 (UTC)
   
<div style="margin-left: 72px;">Basically, I modified [[w:c:dev:FastDelete|FastDelete]] tool to create a menu with FastDelete buttons instead of separate buttons (which is done by default). The menu is created with:
+
Basically, I modified [[w:c:dev:FastDelete|FastDelete]] tool to create a menu with FastDelete buttons instead of separate buttons (which is done by default). The menu is created with:
   
 
<pre>
 
<pre>
Line 116: Line 115:
   
 
which is the only way I found to create another menu in addition to the main (Edit/Rephrase/Delete and Purge, if installed) one. In order for the menu to actually be a
 
which is the only way I found to create another menu in addition to the main (Edit/Rephrase/Delete and Purge, if installed) one. In order for the menu to actually be a
''menu'', it needs this '''wikia-menu-button'' class but PurgeButton gets appended to that menu too, then. You're saying I can fix that in my personal CSS - how can this be done? I have tried to created a new menu button class but realized that CSS apparently can't "inherit" properties of other classes, and I don't know where to steal the CSS for the standard wikia-menu-button so that I could create another class based on it. If you suggest some other fix, I'd be glad to know about it. [[User:Land_Raider|Land Raider]] 15:00, July 5, 2012 (UTC)</div>
+
''menu'', it needs this ''wikia-menu-button'' class but PurgeButton gets appended to that menu too, then. You're saying I can fix that in my personal CSS - how can this be done? I have tried to created a new menu button class but realized that CSS apparently can't "inherit" properties of other classes, and I don't know where to steal the CSS for the standard wikia-menu-button so that I could create another class based on it. If you suggest some other fix, I'd be glad to know about it. [[User:Land_Raider|Land Raider]] 15:00, July 5, 2012 (UTC)</div>
 
   
 
:::: If you use Wikia's CSS to create complex interface elements, you have to plan for side-effects. Your drop-down button is basically a hack at this point. The only ''real'' fix is to write the CSS for the nav-button yourself. You can take Wikia's CSS as a blueprint, if you like. -- [[w:Message_Wall:Pecoes|peco<span style="vertical-align:-0.2em">e</span>s]] 15:51, July 05, 2012 (UTC)
 
:::: If you use Wikia's CSS to create complex interface elements, you have to plan for side-effects. Your drop-down button is basically a hack at this point. The only ''real'' fix is to write the CSS for the nav-button yourself. You can take Wikia's CSS as a blueprint, if you like. -- [[w:Message_Wall:Pecoes|peco<span style="vertical-align:-0.2em">e</span>s]] 15:51, July 05, 2012 (UTC)
Line 164: Line 162:
 
:::::http://trac.wikia-code.com/browser/wikia/trunk/extensions/wikia/ArticleComments
 
:::::http://trac.wikia-code.com/browser/wikia/trunk/extensions/wikia/ArticleComments
   
:::::And here the code for the message wall:
+
:::::And here the code for the message wall:
 
:::::http://trac.wikia-code.com/browser/wikia/trunk/extensions/wikia/Wall
 
:::::http://trac.wikia-code.com/browser/wikia/trunk/extensions/wikia/Wall
   
Line 224: Line 222:
 
::::It seems the className should have been "oasisThrobber" instead of "wikiaThrobber" :) -- [[w:Message_Wall:Pecoes|peco<span style="vertical-align:-0.2em">e</span>s]] 07:29, September 19, 2012 (UTC)
 
::::It seems the className should have been "oasisThrobber" instead of "wikiaThrobber" :) -- [[w:Message_Wall:Pecoes|peco<span style="vertical-align:-0.2em">e</span>s]] 07:29, September 19, 2012 (UTC)
   
::::: There's a standard MediaWiki throbber: <span class="mw-small-spinner"></span> --[[User_talk:Ciencia Al Poder|Ciencia Al Poder]] <sup>[[w:c:es.pokemon:User_talk:Ciencia Al Poder|en WikiDex]]</sup> 20:11, September 19, 2012 (UTC)
+
::::: There's a standard MediaWiki throbber: --[[User_talk:Ciencia Al Poder|Ciencia Al Poder]] <sup>[[w:c:es.pokemon:User_talk:Ciencia Al Poder|en WikiDex]]</sup> 20:11, September 19, 2012 (UTC)
   
 
::::::I like Wikia's throbber better. It looks good on any kind of background. The MediaWiki throbber only works on white backgrounds. The Wikia throbber also makes a much better inline element because of it's horizontal shape. -- [[w:Message_Wall:Pecoes|peco<span style="vertical-align:-0.2em">e</span>s]] 21:43, September 19, 2012 (UTC)
 
::::::I like Wikia's throbber better. It looks good on any kind of background. The MediaWiki throbber only works on white backgrounds. The Wikia throbber also makes a much better inline element because of it's horizontal shape. -- [[w:Message_Wall:Pecoes|peco<span style="vertical-align:-0.2em">e</span>s]] 21:43, September 19, 2012 (UTC)
Line 233: Line 231:
   
 
When I select “purge” from the pulldown list, the page goes white while it’s updating. Can we turn this feature off? It’s more annoying than useful. Thanks! — <span style="font: bold 125% Garamond;">[[User:SpikeToronto|<span style="color:#DC143C">Spike</span>]][[User talk:SpikeToronto|<span style="color:#000000">Toronto</span>]]</span> 18:59, September 26, 2012 (UTC)
 
When I select “purge” from the pulldown list, the page goes white while it’s updating. Can we turn this feature off? It’s more annoying than useful. Thanks! — <span style="font: bold 125% Garamond;">[[User:SpikeToronto|<span style="color:#DC143C">Spike</span>]][[User talk:SpikeToronto|<span style="color:#000000">Toronto</span>]]</span> 18:59, September 26, 2012 (UTC)
  +
  +
: Personally I like the visual feedback, but I've changed the opacity of the white overlay from 75% to 25%. It's still noticeable but should no longer be intrusive. Is that a compromise you can live with? -- [[w:Message_Wall:Pecoes|peco<span style="vertical-align:-0.2em">e</span>s]] 19:27, September 26, 2012 (UTC)
  +
  +
::Sounds great, peco<span style="vertical-align:-0.2em">e</span>s! It will be far less jarring. Thanks! — <span style="font: bold 125% Garamond;">[[User:SpikeToronto|<span style="color:#DC143C">Spike</span>]][[User talk:SpikeToronto|<span style="color:#000000">Toronto</span>]]</span> 10:51, September 28, 2012 (UTC)
  +
  +
== Hungarian localization ==
  +
  +
<syntaxhighlight lang="javascript">
  +
hu: 'Frissítés',
  +
</syntaxhighlight>
  +
[[User:TK-999|TK-999]] ([[User talk:TK-999|talk]]) 19:54, January 3, 2013 (UTC)
  +
  +
== Russian ==
  +
<syntaxhighlight lang="javascript">
  +
ru: 'Обновить',
  +
</syntaxhighlight>▶[[User:Pandassim0|<font face="Century Gothic" style="color:#fdffff; text-shadow:#000000 0 4px 4px;">''Pandas''</font>]][[User talk:Pandassim0|<font face="Century Gothic" style="color:#fdffff; text-shadow:#000000 0 4px 4px;">''sim0''</font>]]
  +
  +
== French ==
  +
  +
Hi,
  +
  +
I give you french translation:
  +
fr: 'Actualiser',
  +
[[User:Celdrøn|Celdrøn]] ([[User talk:Celdrøn|talk]]) 22:13, May 2, 2013 (UTC)
  +
  +
:Thanks, added. {{User:Mathmagician/sig|04:38 UTC|Friday|3 May 2013}}
  +
  +
== 404 ajax.gif ==
  +
  +
http://slot2.images.wikia.nocookie.net/__cb59990/common/skins/common/images/ajax.gif doesn't exist (anymore). How about <code>/skins/common/images/ajax.gif</code> instead? &mdash;[[User:BryghtShadow|BryghtShadow]] 04:15, May 3, 2013 (UTC)
  +
  +
:Sounds like a good idea. I switched out the image per your suggestion. {{User:Mathmagician/sig|04:38 UTC|Friday|3 May 2013}}
  +
:: It's working now. Thank you. &mdash;[[User:BryghtShadow|BryghtShadow]] 11:45, May 3, 2013 (UTC)
  +
  +
==Italian==
  +
Hi, this is the Italian localization:
  +
<syntaxhighlight lang="javascript">
  +
it: 'Aggiorna',
  +
</syntaxhighlight> --{{SUBST:User:Xwx/sig|12:45|4|May|2013}}
  +
  +
:{{Done}} Done — <span style="font:bold 14px Verdana">[[User:Original Authority|<span style="color:#000000;">Original</span>]][[User talk:Original Authority|<span style="color:#006400;">Authority</span>]]</span> <small>at Wikia Developers Wiki</small> 21:53, August 9, 2013 (UTC)
  +
  +
== Translations ==
  +
  +
This page '''is locked for some reason, none of the others are''', so could somebody with permission add the following translations:
  +
<syntaxhighlight lang="javascript">
  +
//Chinese
  +
ch: '刷新',
  +
//bulgarian
  +
bg: 'Обновяване',
  +
//italian
  +
it: 'Aggiorna',
  +
</syntaxhighlight>
  +
:- Thanks! — <span style="font:bold 14px Verdana">[[User:Original Authority|'''Original''']][[User talk:Original Authority|<span style="color:#006400;">Authority</span>]]</span> <small>at Wikia Developers Wiki [[File:Fav.png]]</small> 13:52, August 10, 2013 (UTC)
  +
  +
==Traditional Chinese translation==
  +
重新整理
  +
[[User:C933103|c933103]] ([[User talk:C933103|talk]]) 10:51, December 23, 2013 (UTC)
  +
  +
== Portuguese translation ==
  +
//portuguese
  +
pt: 'Actualizar',
  +
//brazilian portuguese
  +
pt-br: 'Atualizar',
  +
  +
[[User:Garomus|<font face="Trebuchet MS" color="blue">'''Garomus'''</font>]]<sup>[[Message_Wall:Garomus|<font color="red" face="aharoni">w</font>]]•[[Special:Contributions/Garomus|<font color="orange" face="aharoni">c</font>]]</sup> 16:34, May 8, 2014 (UTC)
  +
  +
== Tagalog translation ==
  +
  +
{| class="article-table"
  +
|-
  +
! scope="col"|English
  +
! scope="col"|Tagalog
  +
|-
  +
|purge
  +
|i-purga
  +
|-
  +
|purging
  +
|ipinupurga
  +
|-
  +
|purged
  +
|napurga
  +
|-
  +
|refresh
  +
|muling i-sariwa
  +
|-
  +
|refreshing
  +
|muling isinasariwa
  +
|-
  +
|refreshed
  +
|muling nasariwa
  +
|-
  +
|
  +
|
  +
|-
  +
|
  +
|
  +
|-
  +
|
  +
|
  +
|}
  +
'''[[User:AStranger195|AStranger195]]''' ([[User talk:AStranger195|talk]]) ([[w:c:guestbook:User:AStranger195/Guestbook|guestbook]]) 10:24, June 2, 2015 (UTC)
  +
  +
:Since the English message uses 'Refresh', I've used 'Muling i-sariwa'. Just leave a message if this isn't right and I'll change it! - [[User:OneTwoThreeFall|OneTwoThreeFall]]&nbsp;<sup>([[User talk:OneTwoThreeFall|talk]])</sup> 18:16, January 14, 2016 (UTC)
  +
  +
== Vietnamese translation ==
  +
<syntaxhighlight lang="javascript">
  +
//Vietnamese
  +
vi: 'Làm tươi trang',
  +
</syntaxhighlight>
  +
[[User:Dai ca superman|Dai ca superman]] ([[User talk:Dai ca superman|talk]]) 05:45, January 5, 2016 (UTC)
  +
  +
== Korean translation ==
  +
  +
<syntaxhighlight lang="javascript">
  +
//Korean
  +
ko: '새로 고침',
  +
</syntaxhighlight>
  +
'''[[User:DoCheonGong|<span style="color:#101000">D</span><span style="color:#202000">o</span>]][[User talk:DoCheonGong|<span style="color:#303000">C</span><span style="color:#404000">h</span><span style="color:#505000">e</span><span style="color:#606000">o</span><span style="color:#707000">n</span>]][[Special:Contributions/DoCheonGong|<span style="color:#808000">G</span><span style="color:#909000">o</span><span style="color:#A0A000">n</span><span style="color:#B0B000">g</span>]]''' 15:13, January 12, 2016 (UTC)
  +
  +
==Re: translations==
  +
All the translations above this message have been added to the script! - [[User:OneTwoThreeFall|OneTwoThreeFall]]&nbsp;<sup>([[User talk:OneTwoThreeFall|talk]])</sup> 18:16, January 14, 2016 (UTC)
  +
  +
==Error==
  +
  +
I've encounter this error today, make all other code can't be loaded on my wiki. [[User:Dai ca superman|Dai ca superman]] ([[User talk:Dai ca superman|talk]]) 07:57, September 7, 2016 (UTC)
  +
  +
<code>Error: JavaScript parse error: Parse error: Unexpected token; token } expected in file 'u:dev:PurgeButton/code.js' on line 19</code>
  +
  +
<code>throw new Error("JavaScript parse error: Parse error: Unexpected token; token } ...</code>
  +
:The person who made an edit did not include a comma when adding a language translation, hence the error. Just clear your cache with Ctrl+F5 and it'll go away when the correct version is served. --'''''[[User:SuperSajuuk|Sa]][[User talk:SuperSajuuk|ju]][[Special:Contributions/SuperSajuuk|uk]]''''' 13:45, September 7, 2016 (UTC)
  +
  +
== Not loading? ==
  +
  +
[[MediaWiki:PurgeButton/code.js]] does not seem to be loading today. Is anyone else experiencing this problem? Unfortunately, I do not have a console available to me to determine any error codes. Thanks! :) &mdash; <span style="font: bold 125% Garamond;">[[User:SpikeToronto|<span style="color:#DC143C">Spike</span>]][[User talk:SpikeToronto#top|<span style="color:#000000">Toronto</span>]]</span> 11:59, January 23, 2017 (UTC)
  +
  +
:I'm experiencing this as well. The script's attempts to retrieve updated page data result in 404 errors in the console, so I'm guessing whatever is affecting PurgeButton is related to yesterday's server issues. <span style="font-family:Century Gothic">[[User:Count of Howard|<font color="#cc0b13">'''CoH'''</font>]]</span>&nbsp;<span><sup>[[User talk:Count of Howard|<font color="#000">☎</font>]]</sup></span> 12:17, January 23, 2017 (UTC)
  +
  +
::It’s working now.🤞 &mdash; <span style="font: bold 125% Garamond;">[[User:SpikeToronto|<span style="color:#DC143C">Spike</span>]][[User talk:SpikeToronto#top|<span style="color:#000000">Toronto</span>]]</span> 08:30, January 24, 2017 (UTC)
  +
  +
==Certain CSS and JS pages do not have the button==
  +
I think the button should be added to the CSS and JS pages that don't have it by default, such as personal CSS and JS pages. They don't have the option to refresh pages, forcing users to manually refresh them, which is rather irritating, well for me anyway. ― <span style="font-family:'Constantia'; font-weight:bold; font-size:108%;">[[User:C.Syde65|<font color="maroon">C.Syde</font>]]</span> <span style="font-family:'Adobe Garamond Pro'; font-size:108%;">([[User talk:C.Syde65|<font color="black">talk</font>]] | [[:Special:Contributions/C.Syde65|<font color="black">contribs</font>]])</span> 03:14, July 6, 2017 (UTC)
  +
:Should be fixed as soon as the JS gets reviewed. --'''[[User:Sophiedp|Sop]][[User talk:Sophiedp|hie]]''' 01:42, July 12, 2017 (UTC)
  +
::Still not working on personal CSS and JS pages. ― <span style="font-family:'Constantia'; font-weight:bold; font-size:108%;">[[User:C.Syde65|<font color="maroon">C.Syde</font>]]</span> <span style="font-family:'Adobe Garamond Pro'; font-size:108%;">([[User talk:C.Syde65|<font color="black">talk</font>]] | [[:Special:Contributions/C.Syde65|<font color="black">contribs</font>]])</span> 08:19, July 13, 2017 (UTC)
  +
:::What do you mean by "not working"? Button is added for me on personal CSS/JS pages. - [[User:OneTwoThreeFall|OneTwoThreeFall]]&nbsp;<sup>[[User talk:OneTwoThreeFall|talk]]</sup> 09:42, July 13, 2017 (UTC)
  +
::::Oh. Looks like it was a cache delay on the part of my wiki's MediaWiki:ImportJS page. Turns out I just needed to refresh that page to get the imports to work. ― <span style="font-family:'Constantia'; font-weight:bold; font-size:108%;">[[User:C.Syde65|<font color="maroon">C.Syde</font>]]</span> <span style="font-family:'Adobe Garamond Pro'; font-size:108%;">([[User talk:C.Syde65|<font color="black">talk</font>]] | [[:Special:Contributions/C.Syde65|<font color="black">contribs</font>]])</span> 09:47, July 13, 2017 (UTC)
  +
  +
== Loading Throbber ==
  +
Mind converting the throbber into a modern progress indicator/spinner, like the one in [http://fandomdesignsystem.com/#/components/progress-indicators here]?
  +
  +
'''''~Signed JustLeafy ( ͡| ͜' ͡| )''''' [[User:JustLeafy|<span style="color: darkgreen; border-color: darkgreen; cursor:pointer; padding: 2px 8px;" class="wds-button wds-is-secondary wds-is-squished">USER</span>]] [[User_Talk:JustLeafy|<span style="color: darkgreen; border-color: darkgreen; padding: 2px 8px; cursor:pointer;" class="wds-button wds-is-secondary wds-is-squished">WALL</span>]] 11:26, September 17, 2017 (UTC)
  +
  +
: [[Special:Diff/62080|Done]]. -- <span style="font-family:Courier New;color:yellow">[[User:KockaAdmiralac|<span style="color:yellow">Cube</span>]]-[[User talk:KockaAdmiralac|<span style="color:yellow">shaped</span>]] [[Special:Contributions/KockaAdmiralac|<span style="color:yellow">garbage can</span>]]</span> 09:37, September 17, 2017 (UTC)
  +
  +
::It's still the same. '''''~Signed JustLeafy ( ͡| ͜' ͡| )''''' [[User:JustLeafy|<span style="color: darkgreen; border-color: darkgreen; cursor:pointer; padding: 2px 8px;" class="wds-button wds-is-secondary wds-is-squished">USER</span>]] [[User_Talk:JustLeafy|<span style="color: darkgreen; border-color: darkgreen; padding: 2px 8px; cursor:pointer;" class="wds-button wds-is-secondary wds-is-squished">WALL</span>]] 11:26, September 17, 2017 (UTC)
  +
::: The script has to be approved before it changes. -- <span style="font-family:Courier New;color:yellow">[[User:KockaAdmiralac|<span style="color:yellow">Cube</span>]]-[[User talk:KockaAdmiralac|<span style="color:yellow">shaped</span>]] [[Special:Contributions/KockaAdmiralac|<span style="color:yellow">garbage can</span>]]</span> 14:52, September 17, 2017 (UTC)
  +
  +
== Simplify ==
  +
This script seems unnecessarily complicated. All it does is perform a simple action with requires no user input, aside from initiating the process. Could we not just rewrite it to be add a simple <code>?action=purge</code> href, similarly to [[View Raw]]? {{User:TheGoldenPatrik1/sig.css|00:27, October 5, 2018 (UTC)}}
  +
:I've cleaned up and rewritten the script, and it should be a lot simpler now. --'''[[User:Sophiedp|Sop]][[User_talk:Sophiedp|hie]]''' 06:25, October 8, 2018 (UTC)
  +
::Excellent. {{User:TheGoldenPatrik1/sig.css|14:03, October 9, 2018 (UTC)}}
  +
  +
== Is this exclusive for personal use? ==
  +
I have noticed that other wikis use this function throughout their site. So why is there <nowiki>{{Personal}}</nowiki> on the page? I want a good reason.... -- [[User:AndreMor|AndreMor]] ([[User talk:AndreMor|talk]]) 18:52, July 28, 2019 (UTC)
  +
:It used to not be personal use only, so wikis imported it, but then staff made it personal use only. --[[User:Sophiedp|Sharkie]] 18:56, July 28, 2019 (UTC)
  +
::And the Fandom staff does nothing (not even a warning) to remove the add-on? (As I said, I see that PurgeButton is being used on other wikis (currently) -- [[User:AndreMor|AndreMor]] ([[User talk:AndreMor|talk]]) 19:09, July 28, 2019 (UTC)

Revision as of 19:09, 28 July 2019

Redundant buttons

A bug for you to chew on: Use this, then go on a blog page. Redundant buttons. --Zapwire (invisible leather tardis) 14:14, December 16, 2009 (UTC) Old, as well as any wiki with SMW. Just need to have it check the current ns and not appear if it's in X. Joey (talk) 15:07, December 18, 2009 (UTC)

New profile masthead

With this edit, Monchoman45 fixed the code for the Purge button so that it would work with the new profile masthead. It worked brilliantly for a bit. But, now it seems to have stopped working in the user and usertalk namespaces again. Just wanted to alert you guys. Thanks! — SpikeToronto 05:37, August 26, 2011 (UTC)

Should be fixed. grunny:~$ 16:40, August 26, 2011 (UTC)
It works! Only, now the pulldown has a certain level of tranparency to it pulls down behind other elements. Although that may only be on pages with the new RTE activated. Thanks! — SpikeToronto 21:17, August 26, 2011 (UTC)
Update: Well, it is working great on userpages and user talkpages, and in other namespaces. However, it does not show up in subpages in the user namespace. (See here for an example.) Thanks! — SpikeToronto 07:36, August 29, 2011 (UTC)
Should be fixed. grunny:~$ 08:10, August 30, 2011 (UTC)

Localizations

Can the translations be added in a similar way to ShowHide code? leviathan_89 21:50, March 11, 2012 (UTC)

Other Languages — Chinese

"Purge" in Chinese is "刷新" -- Sam Wang (talk) 04:57, May 13, 2012 (UTC)

Small improvement

There are two things that I feel could be improved upon:

  1. The dangling "action=purge" in the URL is really annoying.
  2. This function does not purge the browser's cache.

So how about this:

function purge () {
    $.get('/index.php?title=' + encodeURIComponent(wgPageName) + '&action=purge', function () {
        location.reload(true);
    });
}

Or in full:

if( wgNamespaceNumber >= 0 && !window.PurgeButtonsLoaded && document.getElementById('control_purge') == null && wgNamespaceNumber != 500 && wgNamespaceNumber != 502 ) {
    addOnloadHook( addPurgeButton );
}
var PurgeButtonsLoaded = true; // prevent duplicate running (but not dupe buttons from outside this code)

function addPurgeButton () {
    var theText = 'Refresh'; //default text, ala SMW
    
    if( typeof PurgeButtonText == "string" ) {
        theText = PurgeButtonText;
    }

    function purge () {
        $.get('/index.php?title=' + encodeURIComponent(wgPageName) + '&action=purge', function () {
            location.reload(true);
        });
    }
    
    switch( skin ) {
        case 'answers': /* forked from monaco, close enough, pass to monaco */
        case 'awesome': /* you really shouldnt even have this value... */
        case 'monaco_old': /* really, where are you getting these skin settings from... */
        case 'monaco':
            $('#page_controls').append('<li id="control_purgebutton"><img src="/skins/common/blank.gif" class="sprite refresh" /><a id="purge" href="javascript:void(0)" title="Purge page">'+ theText + '</a></li>');
            break;


        case 'uncyclopedia': /* monobook clone, pass to monobook */
        case 'wowwiki': /* monobook clone, pass to monobook */
        case 'lostbook': /* monobook clone, pass to monobook */
        case 'monobook':
            $('#p-cactions > .pBody > ul').append('<li id="ca-purge"><a id="purge" href="javascript:void(0)" title="Purge page">'+ theText + '</a></li>');
            break;

        case 'oasis':
        case 'wikia':
            $(((wgNamespaceNumber == 2 || wgNamespaceNumber == 3) && $( '.UserProfileActionButton' ).length ? '.UserProfileActionButton' : '#WikiaPageHeader') + ' > .wikia-menu-button > ul').append('<li><a id="purge" href="javascript:void(0)" title="Purge page">'+ theText + '</a></li>');
            break;

    }
    
    $('#purge').click(purge);
}

-- pecoes 18:39, June 11, 2012 (UTC)

*bump* pecoes 05:54, June 13, 2012 (UTC) -- pecoes 09:57, June 13, 2012 (UTC)
Done. Cheers, grunny@:~$ 16:47, June 16, 2012 (UTC)
Thanks! I like how this clears the ?action=purge from the URL. That way, if I want, I can just Ctrl-F5 after. Thanks guys! — SpikeToronto 21:50, June 16, 2012 (UTC)
Actually, you don't have to Ctrl+F5 anymore. That's already included. -- pecoes 21:57, June 16, 2012 (UTC)
Perfect! Double thanks!! — SpikeToronto 22:28, June 16, 2012 (UTC)
By the way, at least in Internet Explorer, this new function is closer to Reload than Refresh. Thanks! — SpikeToronto 05:22, June 17, 2012 (UTC)

Only add to main menu button

Can the code be changed to only append Purge to the main menu button? I have created a second menu button with extra admin functions and I'm annoyed that Purge gets appended there as well since it's of class "wikia-menu-button" too. Land Raider 13:49, July 3, 2012 (UTC)

Do you have an example page? Or can you post your button's HTML and/or where it's located in the DOM? -- pecoes 14:24, July 03, 2012 (UTC)
You can probably fix this in your personal CSS. — SpikeToronto 19:32, July 4, 2012 (UTC)

Basically, I modified FastDelete tool to create a menu with FastDelete buttons instead of separate buttons (which is done by default). The menu is created with:

$( 'header.WikiaPageHeader' ).append('<nav class="wikia-menu-button"><a title="FastDelete" data-summary="Cleanup. See [[MediaWiki:Policy|Policy]] for details" data-id="fastdelete"><img class="sprite edit-pencil" width="30" height="16" src="data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D" alt="">FastDelete</a><span class="drop"><img class="chevron" src="data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D"></span><ul id="fastdelete-list" class="WikiaMenuElement"></ul></nav>');

which is the only way I found to create another menu in addition to the main (Edit/Rephrase/Delete and Purge, if installed) one. In order for the menu to actually be a

menu, it needs this wikia-menu-button class but PurgeButton gets appended to that menu too, then. You're saying I can fix that in my personal CSS - how can this be done? I have tried to created a new menu button class but realized that CSS apparently can't "inherit" properties of other classes, and I don't know where to steal the CSS for the standard wikia-menu-button so that I could create another class based on it. If you suggest some other fix, I'd be glad to know about it. Land Raider 15:00, July 5, 2012 (UTC)

If you use Wikia's CSS to create complex interface elements, you have to plan for side-effects. Your drop-down button is basically a hack at this point. The only real fix is to write the CSS for the nav-button yourself. You can take Wikia's CSS as a blueprint, if you like. -- pecoes 15:51, July 05, 2012 (UTC)
Where do I find Wikia's CSS which defines wikia-menu-button? Land Raider 15:05, July 6, 2012 (UTC)
What you’ve done, LandRaider, sounds very interesting. If I understand it correctly, it adds the FastDelete buttons to the edit button pulldown? Could it be made to branch out from the "delete" entry on the button? The reason I ask is that the pulldown is already long with all the options already there. Thanks! — SpikeToronto 00:24, July 6, 2012 (UTC)
No, it creates a second menu because as you said, the Edit one is already quite crowded and those buttons delete a page instantly, so caution is needed when using them and it's better to separate them from standard tools. Take a look. Land Raider 15:05, July 6, 2012 (UTC)
As a quick hack: How about adding a height property to the dropdown and setting the overflow to "hidden"?
And out of curiosity: What do those sub-buttons mean? -- pecoes 15:51, July 06, 2012 (UTC)
EDIT: Sorry I didn't see your follow-up question above: You can find the CSS for menu button by "inspecting" the element either with Firefox/Firebug or Chrome. -- pecoes 15:53, July 06, 2012 (UTC)
Sub-buttons? "Wiki" for questions that can be answered by reading the "main" wiki (game answers wikias are not contributor-powered search engines for easily accessible documented knowledge, after all!), "Opinion" for breaking the Wikia answers policy (questions which can only have answers based on personal opinion are considered out of place) and "Spec" for baseless speculation requests (inquiries about information that cannot be deduced from the topic's media - games, movies, books, etc. - and is therefore baseless speculation). Regarding inspecting, I did that already (that's how I got the code for the button on the first place), but I was too confused with the CSS, I know very little about it and JavaScript. I'll try it out soon though, thanks for your suggestion! As for the quick hack, it's a good idea but a complete abomination from my point of view, an extra level of complexity... better try creating my own button with CSS :) Land Raider 20:14, July 6, 2012 (UTC)

"better try creating my own button with CSS :)"

Absolutely :) -- pecoes 20:39, July 06, 2012 (UTC)

What about adding .eq(0) to the PurgeButton selector? CSS classes are ther to be reused. No need to reinvent the wheel, specially when he wants to have the exact same functionality of the already existing menu button. I'm too lazy at that moment to switch to the Oasis skin, but if the existing button has an ID, PurgeButton should select the menu button by the ID rather than the CSS class, to prevent this from occurring. Otherwise, better put .eq(0) to the selector --Ciencia Al Poder en WikiDex 12:15, July 7, 2012 (UTC)
Only Grunny has edit-rights for the code and he hasn't chimed in yet. -- pecoes 12:48, July 07, 2012 (UTC)
What does .eq(0) do? Also, I tried selecting by ID in my customized PurgeButton code which I imported to DAA and it didn't work, but ought to be just my lame JS skills. If this can be done, I'd be delighted. Land Raider
Cienca's suggestion was that it would be easier to modify the PurgeButton script with .eq(0) then for you to recreate the CSS from scratch. .eq(0) selects the first matching node, so attaching it to the jQuery selector would cause only the first nav of class wikia-menu-button to be retrofitted with the purge-option.
In other words: .eq(0) would only be of indirect use to you. In your own code it's probably useless. But if you're interested anyway, take a look at this and this -- pecoes 15:27, July 08, 2012 (UTC)

For blog posts

I need to purge blog posts to see properly their replies. I do it by entering ?action=purge manually, but what if PurgeButton could also purge the blog posts? Cafeinlove, 22:06, July 10, 2012 (UTC)

You cannot see it in the URL but requesting ?action=purge is exactly what PurgeButton does. -- pecoes 00:39, July 11, 2012 (UTC)
Right, though buttons can be sometimes helpful. I actually edit on an old laptop with a not so good disposition of keyboard and I made typo 2 times while typing just ?action=purge, arrr(!) The best solution would be to make blog comments auto-refresh, but as now they are not. Cafeinlove, 03:01, July 11, 2012 (UTC)
Ah. I understand now. You mean the comments section under blogs and articles. Yes, those don't update while you're looking at the page. And you're right: That's really annoying.
The PurgeButton is not the right tool for this, I'm afraid. But MathMagician and I happen to be working on a little suite of tools for article comments and message walls. We really should put polling for new comments on the feature list! What do you think Math? -- pecoes 03:14, July 11, 2012 (UTC)
Hmmmm, auto-refreshing (I assume you mean *just* the comments, probably some sort of ajax thing, not the entire page) would be pretty neat. Also outside of my experience. But definitely neat. — Mathmagician (message wall) 00:16, July 12, 2012 (UTC)
That's outside of my experience too. We'd have to do a bit of reverse engineering on the wikia code to find out how they poll notifications and how they fetch messages...
Here's the code for article comments:
http://trac.wikia-code.com/browser/wikia/trunk/extensions/wikia/ArticleComments
And here the code for the message wall:
http://trac.wikia-code.com/browser/wikia/trunk/extensions/wikia/Wall
As awesome as this would be to have, it would be a little difficult to pull off. -- pecoes 05:58, July 12, 2012 (UTC)

(reset indent) I just stopped to thank you for considering this suggestion. I hope your work will go well and I'll look forward to eventual news. Cafeinlove, 08:02, July 17, 2012 (UTC)

Where do you add this to make it work

Global.js or global.css?User talk:Not the person you're thinking of|NTPYTO22:10, August 7, 2012 (UTC)

w:Special:MyPage/global.js -- pecoes 22:28, August 07, 2012 (UTC)

Thanks!User talk:Not the person you're thinking of|NTPYTO15:48, August 8, 2012 (UTC)

PurgeButton not working in User_blog: namespace

It appears that the refresh option does not appear in the Oasis 'edit' button dropdown when editing blog posts in the User blog namespace. My guess would be this is a small bug that might have something to do with the button being in a different place. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 22:36 UTC, Sunday, 16 September 2012

The current code simply aborts when the page is in the Blog or User Blog namespace.
This would fix it:
// if user blog, test if the current user owns the blog; if yes proceed, if not abort    
if ( [ 500, 502 ].indexOf( mw.config.get( 'wgNamespaceNumber' ) ) !== -1 ) {
    var user = mw.config.get( 'wgUserName' );
    if ( mw.config.get( 'wgTitle' ).slice( 0, user.length ) !== user) {
        return;
    }
}


-- pecoes 05:58, September 17, 2012 (UTC)
Grunny was so kind to give me edit rights. The button should work on blogs now. -- pecoes 13:51, September 18, 2012 (UTC)
Cool. A couple notes though: First: I'm not sure exactly why you need to test whether or not the user owns the blog? (Oasis: button doesn't appear if you don't own the blog, Monobook: Just add the PurgeButton where it would normally go?)
Secondly, where are you getting this magical "startThrobbing" function from? 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 22:22 UTC, Tuesday, 18 September 2012
  1. You may have a point there. It works though. So forgive me for leaving it like this for now :)
  2. I accidentally found $.fn.startThrobbing and $.fn.stopThrobbing in oasis_shared_user_js. Those two functions are not all that fancy though:
$.fn.startThrobbing = function () {
    this.append('<div class="wikiaThrobber"></div>');
};
$.fn.stopThrobbing = function () {
    this.find('.wikiaThrobber').remove();
};
-- pecoes 02:42, September 19, 2012 (UTC)


Thanks. I was sure it wasn't in the jQuery API, but I still had no clue what else would be adding it in. Also, (at the time I first posted) I couldn't get the function to work when calling it from the console. I did something like $(document.body).startThrobbing() and it didn't do anything. I realized just now that you actually have to be looking at the top of the page (which of course is fine with PurgeButton because the edit button is at the top of the article). If you scroll down to the bottom of the page, the throbber can't be seen anymore. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 03:09 UTC, Wednesday, 19 September 2012
Fixed the throbber and commented out the test whether the user owns the blog or not. -- pecoes 04:45, September 19, 2012 (UTC)
Confirmed that superfluous code is superfluous and can safely be removed. Discovered that the throbber doesn't work in the Monobook skin :P 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 07:04 UTC, Wednesday, 19 September 2012
It seems the className should have been "oasisThrobber" instead of "wikiaThrobber" :) -- pecoes 07:29, September 19, 2012 (UTC)
There's a standard MediaWiki throbber: --Ciencia Al Poder en WikiDex 20:11, September 19, 2012 (UTC)
I like Wikia's throbber better. It looks good on any kind of background. The MediaWiki throbber only works on white backgrounds. The Wikia throbber also makes a much better inline element because of it's horizontal shape. -- pecoes 21:43, September 19, 2012 (UTC)
I prefer standarization, and functionality in this case, over beautifulness, or the fact that the mediawiki throbber works on all skins ;) --Ciencia Al Poder en WikiDex 18:44, September 20, 2012 (UTC)

Page turning white

When I select “purge” from the pulldown list, the page goes white while it’s updating. Can we turn this feature off? It’s more annoying than useful. Thanks! — SpikeToronto 18:59, September 26, 2012 (UTC)

Personally I like the visual feedback, but I've changed the opacity of the white overlay from 75% to 25%. It's still noticeable but should no longer be intrusive. Is that a compromise you can live with? -- pecoes 19:27, September 26, 2012 (UTC)
Sounds great, pecoes! It will be far less jarring. Thanks! — SpikeToronto 10:51, September 28, 2012 (UTC)

Hungarian localization

            hu: 'Frissítés',

TK-999 (talk) 19:54, January 3, 2013 (UTC)

Russian

            ru: 'Обновить',

Pandassim0

French

Hi,

I give you french translation:

fr: 'Actualiser',

Celdrøn (talk) 22:13, May 2, 2013 (UTC)

Thanks, added. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 04:38 UTC, Friday, 3 May 2013

404 ajax.gif

http://slot2.images.wikia.nocookie.net/__cb59990/common/skins/common/images/ajax.gif doesn't exist (anymore). How about /skins/common/images/ajax.gif instead? —BryghtShadow 04:15, May 3, 2013 (UTC)

Sounds like a good idea. I switched out the image per your suggestion. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 04:38 UTC, Friday, 3 May 2013
It's working now. Thank you. —BryghtShadow 11:45, May 3, 2013 (UTC)

Italian

Hi, this is the Italian localization:

            it: 'Aggiorna',

--{{SUBST:User:Xwx/sig|12:45|4|May|2013}}

Done! Done — OriginalAuthority at Wikia Developers Wiki 21:53, August 9, 2013 (UTC)

Translations

This page is locked for some reason, none of the others are, so could somebody with permission add the following translations:

//Chinese
ch: '刷新',
//bulgarian
bg: 'Обновяване',
//italian
it: 'Aggiorna',
- Thanks! — OriginalAuthority at Wikia Developers Wiki File:Fav.png 13:52, August 10, 2013 (UTC)

Traditional Chinese translation

重新整理 c933103 (talk) 10:51, December 23, 2013 (UTC)

Portuguese translation

//portuguese
pt: 'Actualizar',
//brazilian portuguese
pt-br: 'Atualizar',

Garomuswc 16:34, May 8, 2014 (UTC)

Tagalog translation

English Tagalog
purge i-purga
purging ipinupurga
purged napurga
refresh muling i-sariwa
refreshing muling isinasariwa
refreshed muling nasariwa

AStranger195 (talk) (guestbook) 10:24, June 2, 2015 (UTC)

Since the English message uses 'Refresh', I've used 'Muling i-sariwa'. Just leave a message if this isn't right and I'll change it! - OneTwoThreeFall (talk) 18:16, January 14, 2016 (UTC)

Vietnamese translation

//Vietnamese
vi:  'Làm tươi trang',

Dai ca superman (talk) 05:45, January 5, 2016 (UTC)

Korean translation

//Korean
ko:  '새로 고침',

DoCheonGong 15:13, January 12, 2016 (UTC)

Re: translations

All the translations above this message have been added to the script! - OneTwoThreeFall (talk) 18:16, January 14, 2016 (UTC)

Error

I've encounter this error today, make all other code can't be loaded on my wiki. Dai ca superman (talk) 07:57, September 7, 2016 (UTC)

Error: JavaScript parse error: Parse error: Unexpected token; token } expected in file 'u:dev:PurgeButton/code.js' on line 19

throw new Error("JavaScript parse error: Parse error: Unexpected token; token } ...

The person who made an edit did not include a comma when adding a language translation, hence the error. Just clear your cache with Ctrl+F5 and it'll go away when the correct version is served. --Sajuuk 13:45, September 7, 2016 (UTC)

Not loading?

MediaWiki:PurgeButton/code.js does not seem to be loading today. Is anyone else experiencing this problem? Unfortunately, I do not have a console available to me to determine any error codes. Thanks! :) — SpikeToronto 11:59, January 23, 2017 (UTC)

I'm experiencing this as well. The script's attempts to retrieve updated page data result in 404 errors in the console, so I'm guessing whatever is affecting PurgeButton is related to yesterday's server issues. CoH  12:17, January 23, 2017 (UTC)
It’s working now.🤞 — SpikeToronto 08:30, January 24, 2017 (UTC)

Certain CSS and JS pages do not have the button

I think the button should be added to the CSS and JS pages that don't have it by default, such as personal CSS and JS pages. They don't have the option to refresh pages, forcing users to manually refresh them, which is rather irritating, well for me anyway. ― C.Syde (talk | contribs) 03:14, July 6, 2017 (UTC)

Should be fixed as soon as the JS gets reviewed. --Sophie 01:42, July 12, 2017 (UTC)
Still not working on personal CSS and JS pages. ― C.Syde (talk | contribs) 08:19, July 13, 2017 (UTC)
What do you mean by "not working"? Button is added for me on personal CSS/JS pages. - OneTwoThreeFall talk 09:42, July 13, 2017 (UTC)
Oh. Looks like it was a cache delay on the part of my wiki's MediaWiki:ImportJS page. Turns out I just needed to refresh that page to get the imports to work. ― C.Syde (talk | contribs) 09:47, July 13, 2017 (UTC)

Loading Throbber

Mind converting the throbber into a modern progress indicator/spinner, like the one in here?

~Signed JustLeafy ( ͡| ͜' ͡| ) USER WALL 11:26, September 17, 2017 (UTC)

Done. -- Cube-shaped garbage can 09:37, September 17, 2017 (UTC)
It's still the same. ~Signed JustLeafy ( ͡| ͜' ͡| ) USER WALL 11:26, September 17, 2017 (UTC)
The script has to be approved before it changes. -- Cube-shaped garbage can 14:52, September 17, 2017 (UTC)

Simplify

This script seems unnecessarily complicated. All it does is perform a simple action with requires no user input, aside from initiating the process. Could we not just rewrite it to be add a simple ?action=purge href, similarly to View Raw? Patrik 00:27, October 5, 2018 (UTC)

I've cleaned up and rewritten the script, and it should be a lot simpler now. --Sophie 06:25, October 8, 2018 (UTC)
Excellent. Patrik 14:03, October 9, 2018 (UTC)

Is this exclusive for personal use?

I have noticed that other wikis use this function throughout their site. So why is there {{Personal}} on the page? I want a good reason.... -- AndreMor (talk) 18:52, July 28, 2019 (UTC)

It used to not be personal use only, so wikis imported it, but then staff made it personal use only. --Sharkie 18:56, July 28, 2019 (UTC)
And the Fandom staff does nothing (not even a warning) to remove the add-on? (As I said, I see that PurgeButton is being used on other wikis (currently) -- AndreMor (talk) 19:09, July 28, 2019 (UTC)