Problem with userscript on ViolentMonkey plugin.


David Košecký

Recommended Posts

I want to install "Clear dark facebook by book777" userscript using Violent Monkey plugin, but it doesn't work on latest MX5 (tested on Google's Chrome)

--

Tried solution:
1) Adding @grant from this page.
2) Disabling all extensions.
3) Other themes works.

Solution:
NOT SOLVED: waiting


--

I also speak with the author of this theme, but he couldn't find solution yet. Theme's working for other browsers judging by comments on userstyles.org.

Does anyone know why isn't it working on latest MX5? :(

- David Košecký

Edited by David Košecký
Link to comment
Share on other sites

14 hours ago, PHYR said:

You can find other scripts for FB here: https://greasyfork.org/en/scripts?q=facebook.com

But I use this one which works on all (mostly) sites https://greasyfork.org/en/scripts/15675-nightvision-mode-夜间模式 

Here's how FB looks with it.

NIGHT VISION..png

Thanks for tip, but i don't like this theme.. :/

I want to fix that "clear dark facebook by book777"

Link to comment
Share on other sites

1 hour ago, David Košecký said:

I want to fix that "clear dark facebook by book777"

Been playing around to see where the issue is. Only thing i've found so far is that it's having issues with some of the variables set for colours, it won't read them so nothing happens.

  • Like 1
Link to comment
Share on other sites

Oh, finally I figure out what are you talking about.

I tried to install "clear dark Facebook" using the Stylish extension, while the "install" process never starts after clicking.

So I then tried "install style as userscript", the install succeed, while no change for the facebook theme. And it popped up the warning saying @grant issue.

I'm wondering how can Maxthon help in this case with the info provided that the author had so solution either?

Link to comment
Share on other sites

On 16/05/2017 at 4:32 AM, BugSir006 said:

Oh, finally I figure out what are you talking about.

I tried to install "clear dark Facebook" using the Stylish extension, while the "install" process never starts after clicking.

So I then tried "install style as userscript", the install succeed, while no change for the facebook theme. And it popped up the warning saying @grant issue.

I'm wondering how can Maxthon help in this case with the info provided that the author had so solution either?

Problem shouldn't be in @grant. I spoke with the author of this theme and he said that MX5 didn't support  :root (css).

Is it really it? Perhaps add support for it?

  • Like 1
Link to comment
Share on other sites

19 hours ago, David Košecký said:

hat MX5 didn't support  :root (css).

I'll check this with our developer. So  :root (css). is a kind of HTML format selector?

But I doubt that Maxthon will change at this point just to support one theme from an extension. So if there is any alternative to the extension or the theme, I hight suggest you change the extension.

Link to comment
Share on other sites

On 22/05/2017 at 9:33 AM, BugSir006 said:

I'll check this with our developer. So  :root (css). is a kind of HTML format selector?

But I doubt that Maxthon will change at this point just to support one theme from an extension. So if there is any alternative to the extension or the theme, I hight suggest you change the extension.

No need for alternative... Problem isn't in ViolentMonkey plugin, but in MX5.

Here is proof: https://jsfiddle.net/e9me6kud/

As far as i know :root CSS should be way to make CSS (judging by informations from theme maker).

  • Like 1
Link to comment
Share on other sites

On 23/05/2017 at 3:25 PM, 7twenty said:

Interesting, although https://www.w3schools.com/cssref/tryit.asp?filename=trycss3_root shows that it does work.

I think the problem, isn't :root, rather it's the var and --one options.

i said same thing, but i don't have enough experiences with this kind of CSS.. Maybe devs solve it?

Link to comment
Share on other sites

Doing some digging around and noticed this:

https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables#Browser_compatibility

https://developer.mozilla.org/en-US/docs/Web/CSS/var#Browser_compatibility

Seems these features aren't available in Chrome versions <v48. Seeing as MX5 up till now is based on Blink v47, that's more than likely the reason why it's broken.

But good news is that it works fine, at least with the JSfiddle code that I was testing with, on the latest internal beta. So once that's released you shouldn't have any issues with the ViolentMonkey extension.

  • Like 1
Link to comment
Share on other sites