Giter Club home page Giter Club logo

violentmonkey's Introduction

Violentmonkey

Chrome Web Store Firefox Add-ons Microsoft Edge Add-on Subreddit subscribers

Violentmonkey provides userscripts support for browsers. It works on browsers with WebExtensions support.

More details can be found here.

Join our Discord server:

Discord

Automated Builds for Testers

A test build is generated automatically for changes between beta releases. It can be installed as an unpacked extension in Chrome and Chromium-based browsers or as a temporary extension in Firefox. It's likely to have bugs so do an export in Violentmonkey settings first. This zip is available only if you're logged-in on GitHub site. Open an entry in the CI workflows table and click the Violentmonkey-... link at the bottom to download it.

Environment Variables

The following environment variables will be injected at compilation time for some features to work:

  • SYNC_GOOGLE_CLIENT_ID / SYNC_GOOGLE_CLIENT_SECRET - Google sync service
  • SYNC_ONEDRIVE_CLIENT_ID / SYNC_ONEDRIVE_CLIENT_SECRET - OneDrive sync service

Workflows

Development

Install Node.js and Yarn v1.x.
The version of Node.js should match "node" key in package.json.

# Install dependencies
$ yarn

# Watch and compile
$ yarn dev

Then load the extension from 'dist/'.

Build

To release a new version, we must build the assets and upload them to web stores.

# Build for normal releases
$ yarn build

# Build for self-hosted release that has an update_url
$ yarn build:selfHosted

Release

See RELEASE for the release flow.

Related Projects

violentmonkey's People

Contributors

alexesprit avatar ariasuni avatar bogachenko avatar da2x avatar dependabot[bot] avatar gera2ld avatar github-actions[bot] avatar greydus avatar hawkeye116477 avatar hoang-rio avatar jakseb avatar jesus2099 avatar jojopl1987 avatar kingthunder avatar kubalav avatar nfsmaniac avatar orionlee avatar piter432 avatar qsniyg avatar roryokane avatar scratchbuild avatar scrobbleme avatar simonalling avatar sn-o-w avatar spodermenpls avatar stephengroat avatar sukigu avatar syntaxerrol avatar tophf avatar wvxwxvw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

violentmonkey's Issues

minus in @resource ids makes them inacessible

Defining resource with

...
// @resource some-id http://some.url/...
....

Makes them inaccessible with GM_getResourceURL and GM_getResourceText. Replacing id with some_id makes everything work. GreaseMonkey and TamperMonkey do handle minus correctly.

It is not specified here, what should resource id look like, so this is anyway low priority issue.

correct options for @run-at

you use "-" in 'document-start', 'document-idle' and 'document-end', but it must be "_": 'document_start', 'document_idle' and 'document_end'

Change the text "✖ Scripts enabled" to "✖ Scripts disabled" when scripts disabled

Change the text, and also keep the cross mark:
->
✔ Scripts enabled
✖ Scripts disabled


前两天收到用户反馈“用的是opera,摁启用了也用不了[泪]第一次的时候有用,忽然就用不了了”,
问了半天怎么配置的,最后……
a6a7dc31gw1f278z4ygs4j20bq052dgf 1
而且后来还有一个情况一样的……
所以建议可以改一下这东西的描述……
比如 “脚本已启用” / ”脚本已禁用”

GM_openInTab blocked by popup blocker

In Greasemonkey, GM_openInTab gives the script permission to show popups without giving the website permission. When I use it in Violentmonkey, the popup is blocked, and I have to give permission for it to open. Tested in Violentmonkey 2.2.2, Opera 34.0.2036.31, Windows 10 64-bit with this script:

// ==UserScript==
// @name New Script
// @namespace Violentmonkey Scripts
// @include http://www.example.com/
// @grant GM_openInTab
// ==/UserScript==

GM_openInTab('http://www.google.com/');

Can't Load Version: 2.3.9 Updated: May 15, 2016

after update lastnight 15/5/2016 my extension suddenly dont want work properly. omg i hate this! i forget to backup my script :( how to i get back my script if my extension doesn't load or can't click the icon violentmonkey. RIP!
please FIX!!

script error

Error running script:
TypeError: Cannot read property 'xxx' of undefined

This error appears for variables created with the eval() function, after Opera 34 upgrade.

https://github.com/violentmonkey/violentmonkey/releases/tag/v2.3.8

Me again. ;) :)

When I install this in a clean profile it says "2.3.7" in Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36 OPR/35.0.2066.37 (a little older but it is what my distro gives me)

Until the next time? :)

Sync for script data storage (GM_set/getValue)

It seems that the sync only works for script but not GM_set/getValue's?
Is there any plan to support sync values stored by script also?
Or will there be any new GM_ APIs to handle these value sync?

@grant GM_xmlhttpRequest

Allowing this feature prevents the execution of the script. In Firefox with grease monkey my script works fine, but with violentmonkey it is not the same thing. Please test it, even the primitive script with just one console.log on window.onload doesn't work if @grant GM_xmlhttpRequest is set :-(

关于同步的一些问题

看了下设置,似乎不支持 google account 同步?
至于dropbox/onedrive的支持,是手动还是自动备份?能否做到同一账号授权,多台机子之间同步?能否同步脚本状态,如启用/禁用?
另外,是否考虑发firefox版?如果能通过onedrive等同步,那就可以做到跨浏览器同步,就太棒了。

Violetmonkey in Chrome Web Store.

Hi,

Can you upload your extension to Chrome Web Store? Yeah, I know there's already an extension to manage userscripts, but your extension is visually and functionally better than Tampermonkey.

Oh, by the way: I currently use Chrome, but it's possible to install your extension to Chrome.

I don't say that you must upload your extension to CWS. It's just a question :)

Violent monkey与脚本AdsBypasser有兼容性问题无法完整运行,Opera版本 30.0.1835.88

Gerald你好:

首先很感谢你开发了Violent Monkey,
也很感谢前阵子跟你反馈了Anti-Adblock Killer不能运作的问题後你立刻进行修正,
真的很谢谢!

最近我使用了一个名为「AdsBypasser」的脚本,
发现在Violent monkey内无法实现页面自动跳转、点击的功能;
而在Tampermonkey下这些功能是可以运作的……不知道Gerald能否研究下问题麽?感谢!!

脚本链结如下:
https://greasyfork.org/scripts/4881-adsbypasser

测试链结(这个页面是短网址营利广告连结,AdsBypasser是专门用来跳过这一类网站的脚本。)
http://sh点st
可以发现不能实现自动跳转。

Sync error

Hello,

I have authorized violentmonkey app with Dropbox. After clicking button ,,Sync", the message ,,Sync error!" appears. Why?

Sync enhancement

Currently you sync the scripts and the on/off status. Sometimes a script can not run in another browser or we can use an extension instead of a script, so please make the syncing of the status optional.

It would be great if yo can also include the sorting order of the scripts in the sync.

matrix

Do you have a comparison table of ViolentMonkey vs TamperMonkey on chromium?

能否自定义安装脚本的排序

貌似现在是按照安装顺序排列的。
能否提供自定义选项,可以按照名称/更新日期 等等排序。
最好在设置里面有个默认排序模式的选项。

Bad userscript support in Violentmonkey [Chromium version]

Hi,
in all versions (since v2.0.0.2 release) of Violentmonkey for Opera 15+ (and other browsers based on stock Chromium) there is several problems with userscripts. Some don't work correctly and some scripts probably even don't load (for example script settings of script isn't in the Violentmonkey menu).

Opera Presto (<12) and Maxthon version seem working well. So I think, in scripts isn't a problem (Tampermonkey and Greasemonkey also OK).
I have compared source code of Presto, Maxthon and Chromium version (it seems they all are in many parts of code very similar, some part completely different because of some difference between browsers). So I tried to do some porting (Maxthon/Presto version -> Chromium) myself, but result wasn't good, because I don't have good skills in developing extensions.

Examples of problematic userscripts:

Userscript Description
ČSFD Movie Preview For example THERE if you hover mouse on link of movie name, it should popup a box with a preview of the movie profile).

ČSFD IMDB Rating
Universal Links Checker v7
W.A.R Link Checker (Customized)
------------ | -------------
...and more.

Could you take a look at it, please? Thank you!

貌似新版又出现Bug了……这次出问题的脚本还是Anti-Adblock Killer

Gerald你好:

自从用了Opera以后,一直是你的插件Violent Monkey的爱用者;
前阵子跟Gerald你反馈了Anti-Adblock Killer不能在Violent Monkey运作的问题,
也很谢谢Gerald立马更新消除了不能使用的BUG;
可是最近的版本又不行了。
希望Gerald拨空能修复下,Violent Monkey很好用啊。
我确定了不是脚本的问题,因为相同的脚本在Google Chrome上使用Tamper Monkey可以运作的。

链结如下:
https://github.com/reek/anti-adblock-killer

2.2.0 = not work!

1

It does not respond to mouse clicking.
my scripts do not work!
I can not open / edit any of the script:
If I try to create a new script, then after clicking on the "Save" / "Save and Close" = nothing happens. After clicking the "close" message appears - "changes are not saved, quit?"

Opera_beta_30.0.1835.49

p.s. Maybe you have a pest wound up there?

GM_setValue data not synced between tabs

If I open two tabs, change a value in one tab with GM_setValue, then try to read it in the other tab with GM_getValue, the second tab doesn't see the change.

Here's a test case. Open http://www.example.com/ in two tabs, shift-click in one tab to increase x, and click in the other to read x.

// ==UserScript==
// @name GM_getValue test
// @namespace test
// @include http://www.example.com/
// @grant GM_getValue
// @grant GM_setValue
// ==/UserScript==

document.addEventListener('click', function(e) {
    if (e.shiftKey) {
        var x = GM_getValue('x') || 0;
        x++;
        GM_setValue('x', x);
        document.body.textContent = 'set: x=' + x;
    } else {
        var x = GM_getValue('x') || 0;
        document.body.textContent = 'get: x=' + x;
    }
}, false);

Tested with Violentmonkey 2.2.2, Opera 34.0.2036.31, Windows 10 64-bit.

Errors in Opera 25

Error calling new XMLHttpRequest()

TypeError: Failed to construct 'XMLHttpRequest': Please use the 'new' operator, this DOM object constructor cannot be called as a function.

Error calling new FileReader()

TypeError: Failed to construct 'FileReader': Please use the 'new' operator, this DOM object constructor cannot be called as a function.

cpu usage

From time to time, ViolentMonkey decides to eat up 90% of cpu usage. I tried shutting down tabs one by one to see, if some of them is running a script in a cycle, but I closed them all and still nothing. I seem to be unable to do some resource management as to what userscript might cause it, but since the problems stays even with all tabs closed, I'm going to assume it's VM's bug. The only way to solve is to manualy disable VM extension and then re-enable it.

screenshot: http://i.imgur.com/gE0YQF9.png

Meta data customization do not work

It seems there is something wrong with z-index on the panel. Currently:

.button-panel { z-index: 2; }
.CodeMirror-gutter-wrapper { z-index: 4; }

blh-fs8

Support `@homepageURL`?

Would you be willing to support @homepageURL in the metadata block? It should be nearly the same as VM's @homepage in the metadata block... there is a trend towards using @homepageURL so if I may be so bold as to recommend changing all refs to @homepage to @homepageURL. I am willing to commit a forked branch if you would like to review it.

Thanks for the consideration. :)

Tracking:

Can only have one custom script

Adding my own script using the "New" button works fine.

When I try add a second one using "New" the other script I had is deleted (or over written)

image

Invalid "include" meta tag handling

I have a script - https://github.com/nokeya/direct-links-out/
It must work on google, so I've added some meta tags, according to https://developer.chrome.com/extensions/match_patterns :

// @include     *://google.*
// @include     *://www.google.*
// @include     *://encrypted.google.*

Tampermonkey(Chrome)/Greasemonkey(FF)/Scriptish(FF) - script is activated and working.
Violent Monkey(Opera) - script not activated, icon shows no scripts attached to page.
Tested on Opera35/36 with Violent Monkey 2.2.4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.