If I open two tabs, change a value in one tab with GM_setValue, then try to read it in the other tab with GM_getValue, the second tab doesn't see the change.
// ==UserScript==
// @name GM_getValue test
// @namespace test
// @include http://www.example.com/
// @grant GM_getValue
// @grant GM_setValue
// ==/UserScript==
document.addEventListener('click', function(e) {
if (e.shiftKey) {
var x = GM_getValue('x') || 0;
x++;
GM_setValue('x', x);
document.body.textContent = 'set: x=' + x;
} else {
var x = GM_getValue('x') || 0;
document.body.textContent = 'get: x=' + x;
}
}, false);
Tested with Violentmonkey 2.2.2, Opera 34.0.2036.31, Windows 10 64-bit.