Jump to content

User:Anastrophe/BuildUrOwn

From Wikipedia, the free encyclopedia

Here's the steps to make your own default summaries. Yes, there are a lot of steps, but they're relatively simple and straightforward.

  1. Open your user page in a new browser tab.
  2. In the address bar of your browser, append a filename to it, it can be called anything, but in the form of, for example:
https://wiki.riteme.site/wiki/User:Iljhgtn/MyEditSummaries.js
The file name doesn't matter, just so long as it ends in ".js" - you could call it zoom.js, myfix.js, whatever.
  1. You'll be presented with a page advising that the file doesn't exist, with a link to " Start the User:Iljhgtn/zoom.js (or whatever) page.
  2. Click that link. You'll get an edit page similar to, but not quite the same as usual. It's designed for 'coding'.
  3. In another tab in your browser, visit this specific URL - ignore that it says 'edit', it is protected from editing:
https://wiki.riteme.site/w/index.php?title=User:Deisenbe/Gadget-defaultsummaries.js&action=edit
Recommend confirming for yourself that this is the current source used for the 'edit summaries' gadget.
  1. Click anywhere within the numbered lines, hit 'ctrl-a' to select it, then 'ctrl-c' to copy it.
  2. Go to the tab with your new file, and then 'ctrl-v' paste the text into the empty editing box.
  3. The only text that matters here is within those first 43 or so lines. You'll see, for example,
minorSummaries = [
'Spelling/grammar/punctuation/typographical correction',
'Fixing style/layout errors',
'Reverting vandalism or test edit',
'Reverting unexplained content removal',
'Copyedit (minor)'
],
  1. To 'break' out that first option, just copy and paste it three times beneath then edit the duplicated lines 'down':
'Spelling correction',
'Grammar correction',
'Punctuation correction',
'Typographical correction',
  1. Or you can select any of the listed lines you want as your source, then copy/paste/modify it.
  2. The most critical aspect in making these changes to be certain you retain the single apostrophe at the start of a line and the apostrophe-comma at the end of a line, EXCEPT for the last line of choices, which does NOT end in a comma. For example:
'alpha',
'beta',
'gamma',
'delta',
'epsilon' <--Last line before closing bracket, no comma
],
  1. Save the page once you are satisfied. Wouldn't hurt to keep the file open in the editor for now.
  2. Next, open the page for "common.js", which may already exist and which may or may not have anything in it yet, for example:
https://wiki.riteme.site/wiki/User:Iljhgtn/common.js
  1. Edit the file, and at the bottom of it, add:
importScript('User:Iljhgtn/MyDefaultsummaries.js'); <--Substitute the name you gave your script
  1. Save the file, but leave the edit window open, in case you made any mistakes.
  2. Open your personal 'sandbox', for example,
https://wiki.riteme.site/wiki/User:Iljhgtn/sandbox
  1. And try editing it - and see if your edit summary options are listed correctly. You may need to clear the cache in your browser, typically 'ctrl-F5' on your keyboard, or hold 'ctrl' and click the refresh button in the address bar.
  2. If all appears okay, You're done. If the edit page is screwed up in any way - doesn't render properly, throws errors, etc, then in the editor for common.js, just put a couple of forward slashes - "//" at the beginning of the line for your script, and save it, so that you aren't prevented from further editing.
  3. And, if it is broken, it may need 'further intervention' to make it functional. You can just reply on my talk page and we'll see if we can fix it, and I'll get back to you when I can. Note that your 'common.js' file and the script you created cannot be edited by anyone other than yourself or an administrator.

Good luck.