User:Gxnx0xmx0xn/gn0Marks

From Wikipedia, the free encyclopedia

gn0Marks - A bookmarking tool for Wikipedia based on User:Twinzor/Wikimark.

Quick Start[edit]

  1. Create the page Mypage/mygn0Marks (you can just click this link and then click create).
  2. Open this link to your vector.js file in a new tab (vector is currently the default Wikipedia skin as of March 2015, so it's probably that unless you changed it - it used to be monobook.js I think). Again, you can just click the link and Wikipedia will direct you to your vector.js (or monobook.js) file/page automatically.
  3. Select and copy this bit of text:
importScript('User:Gxnx0xmx0xn/gn0Marks.js');  
  1. On your vector.js page (or monobook.js) that you opened in a new tab, click the button near the top that says 'edit this page'.
  2. Paste the copied line of code at the top of the editing box that appears, then click 'save page' near the bottom.
  3. Bypass your browser cache (here's how) or flush it entirely.
  4. That's it. Look for new tabs on your Wikipedia pages.

Please note that there is no way to make your gn0Marks private in the event someone types in the appropriate url. If you run into problems, you can report at the talk page and maybe someone will be able to figure it out.

PS: I don't really know JavaScript so this is probably a klugey solution. But it works for me.

Description & More Detailed Instructions[edit]

☺ I gn0Mark my favourite pages on Wikipedia and so should you.





gn0Marks is a user script that adds bookmarks functionality to Wikipedia by adding two tabs at the top of your screen, one for adding a bookmark and one for browsing your list. Almost all of the script came from from User:Twinzor's script User:Twinzor/Wikimark. This is a very simple script, and it has pretty much no knowledge of what it's doing. This means that it doesn't check for duplicates or what namespace you're in, so any page can be added (as many times as you'd like). It will (hopefully) however check if you're linking a file, in which case it will add a preceding colon to the link, giving you a text link instead of an image (this feature does not work on other language Wikipedias for the moment). You can format the list however you wish, categorise the entries etc, as new entries are always added to the bottom of the page. The links the script generates are located at Special:Mypage/mygn0Marks by default (this link will automatically take you to /YourUserName/gn0Marks, which you can create if you haven't already). The script will work without any configuring on the user's part, but some aspects of it are configurable. See section "Configuration".

The script has only been tested with Google Chrome. It should work with other javascript-enabled browsers. If you try it out with a browser that's not listed here, you can let everyone know the results at the talk page.

Before using the script, please create Special:Mypage/mygn0Marks (this link will automatically take you to /YourUserName/gn0Marks, which you can create if you haven't already). You can add whatever you wish to top of the page, new links will always be added to the bottom of the page.

To use this script, you must add a line to the javascript file for your current skin. For most users, this will be the your vector.js file (this link will automatically take you to /YourUserName/vector.js); next most likely would be the monobook.js file (this link will automatically take you to /YourUserName/monobook.js). If you have set a different skin in your preferences, look up the correct filename here, but please do note that gn0Marks has not been tested on other skins and may not work.

Edit the page for your skin and add this line:

importScript('User:Gxnx0xmx0xn/gn0Marks.js');

Alternatively, if you'd like to use the script on some other language Wikipedia, add this instead:

/* gn0Marks */
document.write('<script type="text/javascript"' +
  'src="http://en.wikipedia.org/w/index.php?title=User:Gxnx0xmx0xn/gn0Marks.js' +
  '&action=raw&ctype=text/javascript"></script>');

After you've done this, you'll need to bypass your browser cache (or flush it entirely). It seems to sometimes take a moment (no more than about 1 minute) after you've made these changes before it works.


NOTE from User:Twinzor that I'm leaving in: If you are using other scripts, such as Twinkle, the placement of the tabs will depend upon the order of the lines in your monobook.js file, unless you manually configure the tabs' locations. If you place the above line before your Twinkle line, the tabs will be to the left of your Twinkle tabs. If you put it after, they will be to the right. If you've enabled Twinkle from "Gadgets" in your preferences, the WikiMark tabs will appear to the right of the Twinkle ones regardless of it's placement in your monobook.js.

Configuration[edit]

There are a couple of configurable options. You can change the options by adding the configuration variables to your monobook.js (or vector.js, etc.). The variables and their default values are:

Variable names & values:                    Comments (you don't need to add these to monobook.js):
  
WikimarkConfigWikimarksPage = "mygn0Marks";  //The page where your gn0Marks will be stored. This will always be in your userspace. Note that the variable names are still the Wikimark ones.
WikimarkConfigListType = "*";               //Whatever you wish to have in front of each link. Usually * or #, but can be anything.
WikimarkConfigViewMenu = "cactions";        //These two variables set in which menu you'd like the gn0Mark tabs to appear. Can be different for each tab.
WikimarkConfigAddMenu = "cactions";         //Options: cactions, personal, toolbox, navigation.
WikimarkConfigViewNextTo = "";              //These two variables set the menu item to the left of which you'd like the tab to appear.
WikimarkConfigAddNextTo = "";               //Some examples: watchlist, mycontris, edit. If you don't specify this, tab will appear as the last item.

In the variables "WikimarkConfigViewMenu", "...AddMenu", "...ViewNextTo", "...AddNextTo" the View and Add part refer to the tabs for viewing your gn0Marks and adding a new one, respectively. The script will default to the settings above if you don't override them in your skin's .js file. You only have set the variables you wish to change. Please always remember to have the value in quotes (except for the variables that take a number as the value, which should not be in quotes), and end each line with a semicolon ( ; ).

I haven't tested this but it should still work: to mark a specific section, first click on the section's name in the table of contents (or manually add it to the URL by adding #section_name), and then mark the page as normally. For an example configuration, if you'd like to have the "gn0Mark" tab as the last item in the cactions (= content actions) menu, and the link to your gn0Marks right next to your watchlist, you could use this configuration:

 WikimarkConfigViewMenu = "personal";
 WikimarkConfigViewNextTo = "watchlist";

Whether the variables or the importScript line is first in your skin's .js doesn't matter. You may wish to consider adding __NOTOC__ and/or __NOEDITSECTION__ magic words to the top of the page to prevent the page from showing the table of contents and/or section edit links, respectively.

Userboxes[edit]

Want to embed this thing for some reason?

☺ I gn0Mark my favourite pages on Wikipedia and so should you.





Just copy and paste {{User:Gxnx0xmx0xn/gMBox}} in your user page or whatever Wiki page you want. The word gn0Mark will link to this page.

FAQ[edit]

Q: What browsers does it work with?
A: The script has been confirmed to work in Chrome. It probably works in most others.

Q: Where are the marks located in my userspace?
A: They are located at /mygn0Marks in your userspace by default, thus if your username is "Example", they will be at User:Example/mygn0Marks (Special:Mypage/mygn0Marks)

Q: Why does a new window pop open and close?
A: Because Wikipedia seems to have made it difficult or impossible to do the bookmarking the way User:Twinzor had it working before. Also, I'm not a programmer.

Q: Is it possible to change the page where my gn0Marks are saved, or the location of the gn0Mark tabs?
A: It is. See section "Configuration".

Q: Is it possible to hide my gn0Marks from showing to everybody?
A: No, although they'd have to know the url to look for them. Use your browser's bookmarks if you're worried about privacy.

Q: It doesn't work! :( What do I do?
A: First read this whole page, and double check you've followed all the instructions and have a compatible browser. If it still doesn't work, post a bug report on the talk page linked above. When posting a bug report, please try to be as descriptive as possible, and include what browser (and what version of it) you're using. I still probably won't be able to help you but maybe I will, or maybe someone else.

Bug reports[edit]

Please report any questions/comments/bugs to the talk page of this page.