Множество улучшений для нового интерфейса reddit.com, таких как развернутые кнопки лент, увеличенный шрифт, увеличение изображений без редиректа и много другое...
As I see safary uses custom GM, so it may be point of the trouble. But I haven't a mac device to debug it. So I doubt to making some fixes without understanding that it's actually fix the trouble.
I tried to tinker around with this and got to the point that I know the problem is that userscripts doesn't define "GM_getValue" or any of the "GM_" functions (Only GM_getValue and GM_setValue are used in RedditPlusPlus) but they rely on GM.getValue and GM.setValue instead. And the catch is that they are async functions, I started writing a wrapper for the storage but this ended up requiring changes in A LOT of places. I will create a draft PR later but basically this should be the starting point to support both TM and GM:
export class GMStorage {
getValue(key: string, defaultValue: any) {
if (typeof GM_getValue === 'function') {
return Promise.resolve(GM_getValue(key, defaultValue));
} else {
return GM.getValue(key, defaultValue);
}
}
setValue(key: string, value: any) {
if (typeof GM_setValue === 'function') {
return Promise.resolve(GM_setValue(key, value));
} else {
return GM.setValue(key, value);
}
}
}
Works beautifully with Tempermonkey in Chrome/Firefox, but doesn't work in Safari with Userscripts. Please consider Userscripts for Mac.