User:MusikAnimal/customWatchlists.js: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 50:
});
};
var showCustomWatchlistForm = function(appendHtml) {
var html = "<form id='custom_watchlist_form'><fieldset style='margin:20px 0px'>" +
"<legend>Custom watchlists</legend>" + appendHtml;
$("#mw-watchlist-form").after(html);
}
if(wgRelevantPageName === "Special:Watchlist") {
Line 55 ⟶ 61:
var customWatchlists = JSON.parse(data.split("\n")[0]);
var customWatchlistNames = Object.keys(customWatchlists);
var html = "<formp><label idfor='custom_watchlist_formcustom_watchlist_selector'>Custom list:</label>&nbsp;<fieldsetselect styleid='margin:20px 0pxcustom_watchlist_selector'>" +;
html += "<p>No custom watchlists yet! Go to a [[Special:Random|page]] and create a custom watchlist by clicking the \"Custom Watchlists&hellip;\" item in the More menu.</p>"
"<legend>Custom watchlists</legend>" +
"<p><label for='custom_watchlist_selector'>Custom list:</label>&nbsp;<select id='custom_watchlist_selector'>";
 
for(var i=0; i < customWatchlistNames.length; i++) {
var listName = customWatchlistNames[i];
Line 74 ⟶ 78:
"<input type='checkbox' id='custom_watchlist_all_rev' value='wlallrev' /><label for='custom_watchlist_all_rev'>Include multiple revisions to same page</label><br/>" +
"<button id='custom_watchlist_submit'>Go</button></fieldset></p></form>";
 
$("#mw-watchlist-form").aftershowCustomWatchlistsForm(html);
$("#custom_watchlist_submit").click(function(e) {