User:AT/WikiSwap

From Guild Wars Wiki
Jump to navigationJump to search


Info-Logo.png Note: New Version! To update, just perform a hard refresh. (Ctrl+F5, or if that doesn't work, Ctrl+Shift+R for non-IE users). I'm currently testing - if you come across a page where Switch doesn't appear, or doesn't work correctly, please leave a note on this talk page. Thanks!

WikiSwap[edit]

What is it?[edit]

WikiSwap is a small extension that adds a "Switch" tab to your interface. This allows you to view your current page, but in the other wiki ( GWW -> GuildWiki, or GuildWiki -> GWW )

Ok... Why?[edit]

Mostly laziness, as I was spending way too much time switching between wikis, checking if stuff could be ported or had to be done from scratch. There could be potential uses for admins of both wikis ( checking if vandal on GWW = vandal on Gwiki, for instance ) but that was more of an afterthought.

How?[edit]

To use it, simply add this to your monobook.js:

{{subst:User:AT/wikiswapfull.js}}

Then save the page, and perform a hard refresh (Ctrl-F5 in Firefox)


GuildWiki[edit]

As GuildWiki is changing its default skin over to Monaco in the near future, the above instructions won't work soon. JediRogue has kindly ported WikiSwap over to monaco, instructions for use are here.

Source[edit]

Source[edit]

Bugs[edit]

  • Subpages are treated as the full pagename. i.e. "wiki.guildwars.com/wiki/User:AT/WikiSwap" becomes "gw.gamewikis.org/wiki/WikiSwap" Fixed with v0.2
  • Only first section of an IP address is counted. i.e. "127.0.0.1" becomes "127". Fixed with v0.2

Stuff to do[edit]

  • Implement auto-detection of which wiki is being used - See v0.3
  • I'm pretty much failing at seperating the libraries used from the actual WikiSwap function, so it will add quite a bit of code. If anyone can help with this, I'll love em :) Finished
  • Test on GuildWiki
  • Deal with the following:
    • Switching from Guild_Wars_Wiki namespace to GuildWiki namespace (i.e. Guild_Wars_Wiki:Policy to GuildWiki:Policy)
    • Switching from Guild namespace - tab should not be available as there is no Guild namespace on GuildWiki.

Changelog[edit]

v0.4 (current)[edit]

  • Added basic support for Guild Wars Wiki: and GuildWiki: namespaces.

v0.3[edit]

  • Now auto-detects which wiki is being used and switches accordingly
  • Changed tab so it's a bit less intrusive

v0.2[edit]

  • Rewrote getURL function so it can handle IPs and Subpages.
  • Variable to choose GWW -> Gwiki or Gwiki -> GWW.

v0.1[edit]

  • simple switch, GWW -> Gwiki only.