GM_setValue("animeflv",{
"name": "animeflv",
"FavIcon": "https://www.google.com/s2/favicons?domain=animeflv.net",
"searchUrl": "https://animeflv.net/browse?q="
})
GM_setValue("Crunchyroll", {
"name": "Crunchyroll",
"FavIcon": "https://www.google.com/s2/favicons?domain=www.crunchyroll.com",
"searchUrl": "http://www.crunchyroll.com/search?q="
})
const output = {};
for (const key of GM_listValues()) {
output[key] = GM_getValue(key);
}
alert(JSON.stringify(output, null, 2));
Thank you!
Interesting... When I tried that it didn't work. Anyways, do you think the best way to loop that would be like this? (after the for loop)
Object.entries(output).forEach(value => {
alert(value[1].FavIcon);
});
Doesn't matter much
Thanks
Nothing I've tried returns the name,FavIcon neither the searchUrl.
Is this possible to be done?
// ==UserScript==
// @name ..
// @namespace ...
// @version 0.1
// @description ...
// @author hacker09
// @include *
// @run-at document-end
// @grant GM_deleteValue
// @grant GM_listValues
// @grant GM_getValue
// @grant GM_setValue
// ==/UserScript==
GM_setValue("animeflv",{
"name": "animeflv",
"FavIcon": "https://www.google.com/s2/favicons?domain=animeflv.net",
"searchUrl": "https://animeflv.net/browse?q="
})
GM_setValue("Crunchyroll", {
"name": "Crunchyroll",
"FavIcon": "https://www.google.com/s2/favicons?domain=www.crunchyroll.com",
"searchUrl": "http://www.crunchyroll.com/search?q="
})
GM_listValues().forEach(function(pageSearch){
//for (var key in pageSearch) {
//var page = pageSearch[key];
alert(GM_listValues()[0].searchUrl)
//}
});