Skip to content

Script issues/breakage [Firefox only][Violentmonkey latest update v2.12.8][incl. workaround] #48

Closed

Description

@bunkhub

What is the problem?

Just noticed with the latest update (v2.12.8) for ViolentMonkey in Firefox, that the LTKDIFMU-userscript is not functioning correctly (with default settings). There are no issues in Chromium based browsers as far as I can tell. I verified this on multiple versions of Windows using the latest Firefox ESR channel.

Note: Suggested workaround included at the end of this post. I felt it should be appropriate to note the issue here, for anyone else that might be experiencing the same issue.

At first I was under the presumption that maybe the issue was due to ViolentMonkey, and I opened an issue with the associated developer/github page here. However, @tophf suggested that ViolentMonkey is working appropriately, and instead suggested some further explanations which might give some insight towards LTKDIFMU-userscript compatibility: response 1, response 2

How to reproduce it?

  1. Install Firefox ESR http://www.mozilla.org/en-US/firefox/organizations/all.html
  2. Install or update ViolentMonkey to v2.12.8 (in Firefox), grant the extension whatever permissions it needs
  3. Install LTKDIFMU-userscript
  4. Navigate the internet, with Firefox, to any of the destination sites supported from the LTKDIFMU userscript (all are affected).

What is the expected result?

When the script has been initialized, any trial banners are removed from the page, new buttons/functions are added on the control bar at the bottom of the page, and it prompts with a short notification (in page) that says "DIUserscript: Enjoy free uninterrupted music and enhanced features"

What is the actual result?

The script basically does not load nor function. No functions of the script appear to be injected. The 'Start Free Premium Trial' banner remains in the header, none of the buttons/functions the script adds are loaded, and there is no notification from the script that it has even initialized.

As noted above, everything appears to be functioning correctly in Chromium based browsers (with the latest version of ViolentMonkey using default settings), AND when downgrading to the previous v2.12.7 release (in Firefox only) everything appears to be functioning correctly as well.

Workaround

Following suggestion from @tophf, per response 2 manually changing the 'run-at' settings for the userscript in ViolentMonkey to 'document-end' appears to resolve the issue for the time being.

Edit note: originally stated that manually setting the 'document-start' variable, OR 'document-end' both worked - this is incorrect, as I lost track of which version of the extension I was working with across different browser installations (my mistake). ONLY 'document-end' works with v2.18.8. So I edited this post to reflect that change. However, I have not tested all features - it appears to mostly be working correctly albeit a minor GUI issue with the volume slider. I might try the latest beta of ViolentMonkey soon for the run at 'document-body' variable (also suggested by @tophf)

Environment

  • Browser: Firefox ESR
  • Browser version: 78.6.0esr
  • Violentmonkey version: 2.12.8
  • OS: Win7sp1 / Win10 1809-20H2 Home/Pro (x64)

Activity

  1. lethak commented on Dec 29, 2020

    @lethak
    Owner

    Hi, thanks for pointing this out.
    Will take a look at it before next release.
    No date tho

    The only thing I am sure at the moment is that some features won't work as intended if the userscript's code is not injected before anything else.

  2. lethak commented on Apr 7, 2021

    @lethak
    Owner

    The only feature I found not working when starting as "document-end" with VM/FF

    • Play tracks (hero page + "Likes" page)

    Workaround

    I am going to say the only 100% working workaround now is to use Tempermonkey and not Violentmonkey until this is fixed.

    Also Tempermonkey has to be setup with "Inject Mode: Default"

  3. lethak commented on Apr 7, 2021

    @lethak
    Owner

    Investigation

    It appears @tophf was right and the way I instantiated some Vue components had Webpack inject styles and code into the DOM prior to the DOM existing at all.

    A fix is ready and will be in the next release.
    Tested with Chrome, FF, VM, and TM with and without 'Instant' mode.

    Therefore, 'document-start' should be used again after that !

  4. lethak commented on Apr 8, 2021

    @lethak
    Owner

    Released version v2021.4.43 fixed this.
    Therefore, 'document-start' should be used again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions