Skip to content

Instantly share code, notes, and snippets.

@beporter
Last active September 4, 2018 15:57
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save beporter/561f2e95abd4327750e59467c12bf766 to your computer and use it in GitHub Desktop.
A Greasemonkey/Tampermonkey script that will auto-inject your Guild Wars 2 API key (that must have `progression` permissions) into the "Home instance scavenger hunt" wiki page so you'll always see your progress on page load. Be sure to enter your `apiKey` into the script below.
// ==UserScript==
// @name GW2 Home Instance Cats: API Key Injector
// @namespace https://wiki.guildwars2.com/wiki/Hungry_cat_scavenger_hunt
// @version 0.5
// @description Automatically injects your GW2 API key into the form in the "Hungry cat scavenger hunt" wiki page and submits it.
// @author http://github.com/beporter
// @match https://wiki.guildwars2.com/wiki/Hungry_cat_scavenger_hunt
// @updateURL https://gist.github.com/beporter/561f2e95abd4327750e59467c12bf766/raw/gw2_home_instance_cats.user.js
// @grant none
// @run-at document-end
// ==/UserScript==
(function () {
// Get from https://account.arena.net/applications
var apiKey = 'GW2_API_KEY_WITH_PROGRESSION_PERMISSIONS';
RLQ.push(function () {
if (! document.getElementById('apikey').value) {
document.getElementById('apikey').value = apiKey;
}
document.getElementById('findcats').click();
});
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment