Talk:PurgeButton

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! — Spike Toronto  05:37, August 26, 2011 (UTC)


 * Should be fixed. grunny  :&#126;$ 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! — Spike Toronto  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! — Spike Toronto  07:36, August 29, 2011 (UTC)
 * Should be fixed. grunny  :&#126;$ 08:10, August 30, 2011 (UTC)

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

Other Languages &mdash; 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:

Or in full:

-- peco e s 18:39, June 11, 2012 (UTC)


 * * bump* peco e s 05:54, June 13, 2012 (UTC) -- peco e s 09:57, June 13, 2012 (UTC)


 * Done. Cheers, grunny@  :&#126;$ 16:47, June 16, 2012 (UTC)


 * Thanks! I like how this clears the   from the URL. That way, if I want, I can just   after. Thanks guys! — Spike  Toronto  21:50, June 16, 2012 (UTC)


 * Actually, you don't have to Ctrl+F5 anymore. That's already included. -- peco e s 21:57, June 16, 2012 (UTC)


 * Perfect! Double thanks!! — Spike  Toronto  22:28, June 16, 2012 (UTC)


 * By the way, at least in Internet Explorer, this new function is closer to Reload than Refresh. Thanks! — Spike  Toronto  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? -- peco e s 14:24, July 03, 2012 (UTC)


 * You can probably fix this in your personal CSS. — Spike  Toronto  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('FastDelete   ');

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. -- peco e s 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! — Spike  Toronto  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? -- peco e s 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. -- peco e s 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 :) -- peco e s 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. -- peco e s 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  then for you to recreate the CSS from scratch.   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:  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 -- peco e s 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  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. -- peco e s 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? -- peco e s 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. -- peco e s 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 -- peco e s 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.


 * The current code simply aborts when the page is in the Blog or User Blog namespace.


 * This would fix it:


 * -- peco e s 05:58, September 17, 2012 (UTC)


 * Grunny was so kind to give me edit rights. The button should work on blogs now. -- peco e s 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?


 * You may have a point there. It works though. So forgive me for leaving it like this for now :)
 * I accidentally found  and   in oasis_shared_user_js. Those two functions are not all that fancy though:

-- peco e s 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.


 * Fixed the throbber and commented out the test whether the user owns the blog or not. -- peco e s 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


 * It seems the className should have been "oasisThrobber" instead of "wikiaThrobber" :) -- peco e s 07:29, September 19, 2012 (UTC)