Fandom Developers Wiki
Tag: sourceedit
Tag: sourceedit
Line 92: Line 92:
 
:Any errors thrown in your console? The button works fine for me. <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> 11:48, March 6, 2017 (UTC)
 
:Any errors thrown in your console? The button works fine for me. <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> 11:48, March 6, 2017 (UTC)
   
::I have no console in which to throw errors: I am working on an iPad. It has worked perfectly for me too, up until it stopped this weekend. I’ll also drop a note to [[User:UltimateSupreme|UltimateSupreme]] on Slack (although he’s a very busy fellow!). 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> 15:46, March 6, 2017 (UTC)
+
::I have no console in which to throw errors: I am working on an iPad. It has worked perfectly for me too, up until it stopped this weekend. I’ll also drop a note to [[User:UltimateSupreme|UltimateSupreme]] on Slack (although he’s a very busy fellow!). 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> 15:46, March 6, 2017 (UTC)

Revision as of 15:46, 6 March 2017

This is the talk page for discussing improvements to the NullEditButton page.

The button isn't display in the namespace "User"

Hello. Do not know if I passed just me or what, but the button "NullEdit" isn't display in the tools menu in the namespace "User". For example, I'm going to my user page and not the button appears to me, like any other user page. I don't know if it makes a mistake or part of the script running. Thanks beforehand. —Scooty Dash (talk) 20:29, May 19, 2014 (UTC)

Fixed. Also revamped the script a bit ;) ~UltimateSupreme 17:33, June 2, 2014 (UTC)

New behaviour

I just wanted to say that I really like the new behaviour, although it might be useful to add a throbber into the blanked article area - or as an overlay similar to the behaviour of PurgeButton - instead of just the button in the menu, to make it clearly that it is still "in progress" and hasn't just blanked the page. -452 (talk) 15:43, June 30, 2014 (UTC) (edited: 15:46, June 30, 2014 (UTC))

I have been thinking of alternatives with no luck..
But as such the throbber in the button itself and fading out and in the page works for now...--~UltimateSupreme 18:57, June 30, 2014 (UTC)
How about adding a new class, and adding that class to #WikiaArticle when the script begins and removing it when complete?
#WikiaArticle.loading {
  background:url("http://images.wikia.nocookie.net/common/skins/common/images/ajax.gif") no-repeat center 50% !important
}
-452 (talk) 19:19, June 30, 2014 (UTC)
I have created a draft with a throbber, and a few other changes.
  • The throbber is overlaid. (Copied from PurgeButton)
  • The "Editing" and "Getting page" messages have been changed to localisation strings.
  • "Editing" and "Getting pages" messages now use the showResult function so they are more visible.
-452 (talk) 22:12, September 10, 2014 (UTC) (edited 22:13, September 10, 2014 (UTC))

Request

Can something like this please be added in upon success? (To re-enable collapsibles and sortables)

var $collapsibleElements = $( '#mw-content-text' ).find( '.mw-collapsible' ),  
    $sortableTable = $( '#mw-content-text' ).find( 'table.sortable' );
if ( $collapsibleElements.length ) $collapsibleElements.makeCollapsible();
if ( $sortableTable.length ) $sortableTable.tablesorter();

(Copied, and adapted, from AjaxRC/code.js) -452 (talk) 00:50, July 20, 2014 (UTC)

Or just a callback function will do. -452 (talk) 00:51, July 20, 2014 (UTC) (edit: link added 09:19, July 20, 2014 (UTC))

Fixed. What do you mean by "just a callback function will do"?--~UltimateSupreme 06:56, July 20, 2014 (UTC)
Such as ajCallAgain from AjaxRC. -452 (talk) 09:07, July 20, 2014 (UTC)
Tabbers are also not reinitialised after this, BTW.
A callback function would allow users to redo things they normally do on load, without needing to copy+edit the script themselves. In this case, I think re-enabling collapsibles, sortibles and Tabbers are best done in the script since they're common, but I do have one or two non-standard functions I'd like to call. -452 (talk) 13:51, July 28, 2014 (UTC)
Done and done. Thanks for the suggestions--~UltimateSupreme 10:10, August 3, 2014 (UTC)
It is working beautifully, thanks. -452 (talk) 10:22, August 3, 2014 (UTC)
BTW, this, or some variation, can be used to restart all slideshow galleries:
$(".wikia-slideshow").each(function() { WikiaPhotoGallerySlideshow.init({'id':$(this).prop("id") }) });
-452 (talk) 10:42, August 3, 2014 (UTC)

Button

I don't suppose you can give me the code of a modified version of this script to run as a button on a page rather in the dropdown menu? Thanks in advance. – Ozuzanna 15:06, August 11, 2014 (UTC)

By the looks of it, all you need to do is modify the addButton function to add the button to the lower toolbar. I'd leave init alone as it catches pages that can't be edited. Just change addButton to look for .tools instead of a[data-id='history'] cqm 00:03, 12 Aug 2014 (UTC)
Is the toolbar what you talking about or just be able to place a link on the page like you could with ?action=purge ?--~UltimateSupreme 13:43, August 13, 2014 (UTC)

Timeout?

Is there a timeout in place on Null Edit? For example, this page will not work with the Null Edit and a manual Null Edit must be done to update the cache of the page. Maybe an exception list filter could be added to make it not appear on specific pages configured by the end user. --SuperSajuuk Talk Page | Tabber Code | Channel 16:19, August 30, 2014 (UTC)

What? NullEdit works on that page. It takes little time, but it works--~UltimateSupreme 05:51, December 14, 2014 (UTC)
Long pages and pages with a lot of parser functions often time out for me when attempting to NullEdit or MassNullEdit them, but they sometimes work after multiple attempts. I believe that the cause of this is an API timeout that probably can't be increased, although I haven't actually looked into it.
For reference, the two pages which this often happens with for me are 180k and 300k. The page SuperSajuuk linked as a lot of parser functions, so I can see why that would also sometimes fail. -452 (talk) 12:09, December 14, 2014 (UTC)

Using when logged out

mw.Api() does not appear to be available for anon users, so the script fails. If it's not possible to make the script work for anon users, then there should probably be a check for wgUserName at the start of the script, before adding the link. -452 (talk) 17:07, December 13, 2014 (UTC)

Done, thanks--~UltimateSupreme 05:48, December 14, 2014 (UTC)

Notifications not working after Wikia's 17 March update

They've changed up the notification system. Looks pretty easy to fix:

window.GlobalNotification.show(message, result);

becomes

new BannerNotification(message, result).show();

The new notification banners also work under the Monobook skin, so there's no need to check skin. - OneTwoThreeFall (talk) 09:23, March 19, 2015 (UTC)

I’ve also noticed that the green/red notices for success/failure have stopped appearing. Those are very useful. Could they be restored? Thanks! :) — SpikeToronto 17:51, April 27, 2015 (UTC)
Fixed--~UltimateSupreme 07:25, April 28, 2015 (UTC)
Thank you! - OneTwoThreeFall (talk) 11:54, April 28, 2015 (UTC)
Thanks UltimateSupreme!! :) — SpikeToronto 22:00, April 28, 2015 (UTC)

Not appearing 2017-03-06

This has stopped showing up in either the Oasis or the Monobook skin. :( Thanks! :) — SpikeToronto 08:46, March 6, 2017 (UTC)

Any errors thrown in your console? The button works fine for me. CoH  11:48, March 6, 2017 (UTC)
I have no console in which to throw errors: I am working on an iPad. It has worked perfectly for me too, up until it stopped this weekend. I’ll also drop a note to UltimateSupreme on Slack (although he’s a very busy fellow!). Thanks! :) — SpikeToronto 15:46, March 6, 2017 (UTC)