greasemonkey | Greasemonkey is a user script manager for Firefox | Addon library
kandi X-RAY | greasemonkey Summary
kandi X-RAY | greasemonkey Summary
Greasemonkey is a user script manager for Firefox. User scripts are small browser extensions that let you customize your web browsing experience.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Add editor methods to editor instances
- 12 . 1
- Defines options for this editor .
- select mouse down
- activate an action
- Open an XHR object
- Registers event handlers for mouseover events .
- Creates a Wints widget .
- Parses the root language locale
- Represents the CodeMirror editor .
greasemonkey Key Features
greasemonkey Examples and Code Snippets
Community Discussions
Trending Discussions on greasemonkey
QUESTION
I am trying to do a userscript rid of annoying notifications counter on title of pages like Facebook, Linkedin, etc.
Firstly I tried to use the extension "Rename Tab Title" https://chrome.google.com/webstore/detail/rename-tab-title/kppndhfiaenbiioipolacicknfmdcdep with my configuration described in the Support tab of that page, in the comment of user Sérgio Loureiro. But had no success.
What I mean is the "(1) " thing before the page title, that will be rendered on the respective tab. In this case I was doing it for the Vivaldi browser, that supports user script from the base, without any extension. I think this is also available for other browsers via tampermonkey or greasemonkey.
An example:
So I wrote an *.user.js
file with the contents:
ANSWER
Answered 2022-Jan-29 at 22:14I think I have succeeded, following @double-beep's advice of watching not only for characterData
.
This is the script I have now. I also had to make a .match
check before the replace, because some sites were becoming unresponsive.
QUESTION
I tend to write my own user scripts (aka Violentmonkey / Tampermonkey scripts; formerly Greasemonkey scripts). I often end up selecting elements by class name while doing so - either using native javascript or having the script load jQuery and using that.
I've noticed that sometimes I see dynamically generated class names like "SeriesIndexFooter-footer-3WmRg" with the bolded bits appearing to be some randomly generated part (I think this gets generated by React? I haven't used React myself but have sometimes seen "React" in other element names when encountering these). Obviously, I can just hard-code these classnames in my script AS-IS and it will work... but my concern is that if a site / local server app gets updated later that this will break my user script.
e.g.
...ANSWER
Answered 2022-Jan-09 at 21:56There is no way you can predict class suffix that you are talking about.
That is used for purpose of encapsulating styles so that it applies only for that specific element or group of elements.
What you can do in your case is to use few CSS selectors that relay on searching values in attributes. In your case it would look something like this:
QUESTION
I'm trying to write a greasemonkey script that automtically presses a button on a page, but only if a tab is disabled, the tab shows duplicates records and when I inspect the page in firefox using Web Devloper Tools/Inspector I find that when we have duplicates records and the tab is enabled that we have
...ANSWER
Answered 2022-Jan-05 at 09:55Solved the problem by setting timeout to delay running the script until a bit after page loaded based on @Ourobirus comment
QUESTION
I am trying to automatically click the "Still watching? Video Will Pause Soon" button on YouTube so that my videos don't stop after X amount of time. I have created a Tampermonkey/Greasemonkey script to click the button when it appears using waitForKeyElements. It seemed to work, as it clicks the popup. But sometimes it goes into an endless loop where it clicks the popup button and then refreshes the page. The button will pop up again after the refresh and then the button will get clicked again and repeat ad infinitum.
I have provided a screenshot of what I'm talking about. Notice the YouTube popup in the bottom left corner:
Here's the code for the Tampermonkey script:
...ANSWER
Answered 2021-Dec-29 at 21:11With the help of another Stack Overflow thread and the comments here, I was able to get a solution using a selector with contains() and the word "Yes," which appears in the popup button:
QUESTION
I want to create a userscript that will modify the way that a commit message is displayed in the Bitbucket Pipelines console, in a web browser.
So far, I have written the following JavaScript, which works fine on the Bitbucket "commits" page. It does two things:
- Enable line wrapping.
- set a 2-line height.
ANSWER
Answered 2021-Nov-14 at 14:26To simplify your scripts, you can use GM_addStyle
- a Tampermonkey's native method - to apply your CSS. However, if your scripts are just going to include a call to GM_addStyle
, then you should probably use an extension like Stylus.
For your first script, you can use pure CSS instead of attempting to get the element, fetch its class name, then apply some styles to that class.
Here's what I came up with:
QUESTION
On GitLab, you can browse and download job artifacts at annoyingly redirected URLs like these:
- https://gitlab.com/NatoBoram/eldarya-enhancements/-/jobs/artifacts/master/browse/dist?job=deploy
- https://gitlab.com/NatoBoram/eldarya-enhancements/-/jobs/artifacts/master/file/dist/eldarya-enhancements.min.user.js?job=deploy
- https://gitlab.com/NatoBoram/eldarya-enhancements/-/jobs/artifacts/master/raw/dist/eldarya-enhancements.min.user.js?job=deploy
I can use these URLs as a download link in the release page. However, I'm distributing a userscript; users do not want to download them, they want to view them (so TamperMonkey and Greasemonkey can install them).
How do I make it so users can install a userscript from an arbitrary branch/tag/commit without quitting GitLab?
...ANSWER
Answered 2021-Oct-29 at 06:00Unfortunately this is not supported for gitlab.com since workhorse always sets the content disposition as 'attachment' for artifacts, causing the browser to download the file. The only cases where the content disposition header is set as 'inline' is when viewing blobs.
Your best possible workaround would be to commit your built files to the repository (or another repository/snippets) and use the raw view. Conveniently, project snippets are basically a repository within a repository you can use for this purpose.
For example, you can use the project snippets API in your pipeline to create a snippet containing your user scripts, then use the snippet raw URL in your release. I tested this as working with tampermonkey.
Another possible workaround may be to host your files on GitLab pages, but each publish to GitLab pages will overwrite the previous publish, so you'll have to download all your previous artifacts and re-publish them every time if you want to support all your branches/tags.
This may also prove problematic, as concurrent pipelines (like a tag+branch pipeline) may have race-conditions unless you guard them with resource groups.
QUESTION
Refering to my other question: Why does pdf document download instead of showing in a embed/iframe?
When i embed a pdf document like the below examples, it downloads the documents instead of showing it embedded in the website.
...ANSWER
Answered 2021-Sep-28 at 22:24The content-disposition header triggers the save dialog. If you want to avoid it without server-side changes, try loading it via XHR and encode it as "data:" link.
QUESTION
I'm very new to Greasemonkey, so please be understanding. Here is my problem :
I'm currently doing some changes to a web game to make it more usable on a laptop to have a bigger fullscreen without getting rid of any functions. I've basically done everything by myself, but now there's something that I'm not able to do. I want to change the URL (clickable through some text) to my specific URL. I've figured that I can change the href value from the previous url (/maps) to my url (/search). But I'm not able to implement it into my script, as it doesn't work the same as the previous things I changed on the website.
Can anyone help? I think this is relatively easy, I just can't find anything on it, maybe I'm googling the wrong terms.
...ANSWER
Answered 2021-Sep-23 at 08:14Based on the additional information in the comments, this should do
QUESTION
To me it seems like this would be easy to Google for, but I'm not finding anything. I've searched:
- jquery click alert
- jquery submit alert
- jquery click popup
- jquery submit popup
- jQuery click modal dialog
- jQuery submit modal dialog
- jQuery click confirmation
- jQuery submit confirmation
And so on. I fully expect for this to be closed as a duplicate, but I'm listing my searches out so that it can help the next person: maybe it will lead to the answer I couldn't find on my own and save them some time.
That aside, here is the context. I am writing a greasemonkey/tapermonkey userscript that clicks on a button and that button has an event on it that brings up a confirm()
. How do I click on the "OK" or "Cancel" button of that confirm popup?
ANSWER
Answered 2021-Aug-31 at 00:03If the site uses window.confirm
(regardless of whether it also uses jQuery or not), you can overwrite it and implement your own functionality. For example:
QUESTION
So it's been a minute since I've used Greasemonkey scripts and I'm probably forgetting to do something basic but...
What I want to do is when ever I navigate to https://beta.crunchyroll.com to instead redirect me to https://beta.crunchyroll.com/simulcasts/seasons/spring-2021 and I think my current code should do that but isn't for some reason.
...ANSWER
Answered 2021-Jun-23 at 18:27You can simplify the logic.
- Since you only need to run it on
https://beta.crunchyroll.com
, there is no point on running it on other pages @match
is more robust than@include
- Use
@run-at
to run at the earliest possible
Here is an example:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
Install greasemonkey
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page