NetroScript/Jacks-LogsTF-On-Page-Combiner

Grease-/TamperMonkey-less setup & installation issue

Wiethoofd opened this issue · 3 comments

In your installation instructions you say you can put the script in your plugin to get it to work.

However, I'm using 'CJS2' in Chrome which throws an error for the GM_getValue and GM_setValue, which are functions used by GreaseMonkey.

I know this is a far fetched use case to get the script to work by simply adding it to the 'head' of logs.tf, but if there is some way to not have to worry about plugin specific functions that would be appreciated.

Afaik you could use Local Storage instead and get away with it too.


Additionally Chrome throws CORS errors for directly using the raw url to the github file and refuses to load it entirely (which is github preventing such (ab)use of file hosting)

I assumed people would just use it in combination with a userscript manager (because it is after all a userscript) so I just used the API's available, it is just quicker. It also allows the access to websites without caring about the origin policies.

Changing the way data is saved / loaded to using localStorage would be no problem (after all it would just be poly filling the GM_* methods if they don't exist / replacing them).
And changing dependencies to custom injected <script> tags in the head would also not be difficult. (Although you would still need to wait for them to load).
I could also host the script in another location (even a .tf domain) where you get no CORS errors but then again, I ask myself why change the userscript to let's say a normal "library". Especially if most, well almost all already just use it as userscript.

Can you maybe tell me more about your use case [not using something like TamperMonkey]? I personally see no reason for not using any userscript manager.
[But when I have time I would be willing to change some functionality, even if it is just changing the GM_* functions]

I already have a plethora of plugins installed, and use the CJS2 plugin to insert javascript on websites where I use it.

Installing TamperMonkey or GreaseMonkey should easily be doable, but it would be adding another plugin to the already extensive list. Being able to simply use this .js and insert it in the to do its thing would obviously save a plugin.

Hosting the file myself also isn't an issue, I'm just an edge case for requesting a 'vanilla' version of this userscript, not dependent on any plugin custom offered functions.

I offer again, should you want it, I could also host an updated version on scrim.tf (as long as I don't forget to update it there).