I'm using Tampermonkey v 3.6.3737.80 on Chrome Version 33.0.1750.46 beta-m on Windows 7. I have a couple of custom userscripts defined in Tampermonkey, so that the headers are as follows:
// ==UserScript==
// @name MyScript(s)
// @version 0.1
// @description enter something useful
// @include http://domain.com/*
// @include http://www.domain.com/*
// @copyright 2012+, You
// @require http://code.jquery.com/jquery-1.10.2.min.js
// ==/UserScript==
Which, in theory, should work on all pages of the form http://domain.com/*
with or without www
. Generally, the scripts work as they should. However, on certain pages within the site, all of the tampermonkey scripts which are supposed to work on the site seem to stop working. After manually reloading the page the scripts sometimes work again, otherwise a few more reloads will fix the problem. The problem is I don't know why this is happening; the code appears to be sound since it works after refreshing with no other changes. Would it be something to do with chrome and/or tampermonkey?
EDIT:
The script navigates through one of the webpages by using a jQuery trigger, $('#id').trigger('click')
. Clicking this myself does change the URL of the page, which leads me to assume that it's not being done through AJAX? So, when the script does the trigger
, the tampermonkey scripts I have on the next page do not work. However, if I refresh that page, the do work.
What I've also noticed is that if I have the dev console open in chrome (CTRL + SHIFT + I
) that it works fine for some reason. Any idea why this may be?
EDIT v2:
Don't know why it was working with the dev console open, it seems to have stopped doing so and is now again working with the intermittent functionality as described with edit 1, regardless of the console being open or not.