Code Monkey home page Code Monkey logo

violentmonkey-oex's Introduction

Violentmonkey

Violentmonkey, userscripts support for Opera (Presto).

Violentmonkey for Chromium-based browsers: https://github.com/violentmonkey/violentmonkey

For more information, click here.

Development

$ npm i
$ npm run dev
# Then load the extension from 'dist/'.

violentmonkey-oex's People

Contributors

gera2ld avatar jesus2099 avatar loucypher avatar piter432 avatar y0ba 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

violentmonkey-oex's Issues

Bug with updating scripts manually.

The newest developer version of this addon (and stable 1.5.0.1, 1.5.0.2 and 1.5.0.3 versions) has a bug with updating scripts manually (ex. changing manually homepage or version in the scripts). The 1.4 version doesn't have this bug. I'm using newest version of old Opera (12.16). Can you fix this bug?

Show button only when a script is matching the page

We currently have the option to always show VM button or never.

As the main (sole) purpose of this button is to activate/deactivate scripts when available, it would be very nice to have a third option to display the VM button when 1+ user script has matching @include or @match (whether those scripts are activated by user or not).

right ?

violent-monkey-1.5.1.1+Opera Mobile Labs

Hi!
When working on the Opera Mobile Labs (based on Opera Mobile v12.00) and your latest Violent Monkey extension v1.5.1.1, I have encountered in these problems so far:

  1. target = _blank does not work on JS forms when submitting the form --> I think this is because of issues with Opera Mobile Labs and not with your script.
  2. I had to use this.window for global functions like alert(), prompt(),... and open() doesn't work at all!

When working with the android emulator+dragonfly I get this error:
else Object.defineProperty(t,i,{
get:function(){return wrapWindow(window[i]);},
set:function(v){window[i]=v;},
});
}
--> Unhandled Error: Object.defineProperty: invalid modification of non-configurable property
--> I think this is why those global functions do not work.

[1.6.9.2 / Opera 12.17] Bug: Editor is flickering when selecting text by mouse

Very strange problem.

When editing big script (5-8 screens), after some large mouse selection was made and cancelled, any further mouse selections cause serious flickering (editor turns white for a moment). Very often it even causes the mouse to not leave "button pressed" state when real button is released. It's actually almost unusable for me when it's like this.

I have a copy of 1.6.8 and I've compared both versions - there is absolutely no such bug in 1.6.8. Also the editor feels much more responsive there.

I've tried to swap updated files with their old versions from 1.6.8 but ultimately failed to find which one exactly is causing this condition.

I'm not using hardware acceleration in Opera.

cpu consumption

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

Violentmonkey doesn’t install when metadata block is not on topmost of user script

Hello, :)
I’ve just noticed that all of my user scripts that didn’t have the metadata block on topmost 1st line of script wouldn’t trigger Violentmonkey’s install popup.

My metadata is no second line in more and more scripts of mine (example).

The de facto specs say that it’s OK to put the metadata block anywhere near top of file as long as it is in code root :

The metadata block appears in JavaScript line comments and may appear anywhere in the top level Greasemonkey code scope of the script, but is usually near the top of the file.

downloadURL and updateURL metadata autofill

The downloadURL specification says that if it is not set in the user script’s metadata block then it should be filled in with the actual downloaded file URL.
updateURL doesn’t say clearly but greasyfork and openuserjs are also filling it afaik.
Could you add that, please ? :)
I can provide online examples if needed.
Wehn they don’t say, they remain empty in VM’s metadata.

Integrated script editor inserts spaces instead of tabulations

It is not priority issue at all (as I work around by copy/paste back and forth from my EmEditor, now).

I think the integrated editor used to respect my code style by inserting tabulations (as the rest of my script) when pressing ENTER to append a new empty row.

Now it has been inserting new rows with heading spaces instead of tabulations, creating some inconsistencies that I have to remember to fix before committing my changes to my user scripts git repository.

I don’t know if it used to guess what to insert (spaces or tabulations) or if it used to always insert tabulations. Or if I was dreaming. Maybe it always has inserted spaces and I work arounded that all the time, I don’t know.

Scripts don’t run (anymore?) on HTTPS

I’m a new user but I presume it did work before.
I’m on a page that should trigger a script but nothing happens and no script is shown when i click the monkey icon.
Opera 12.17.1863 on Windows 7.

Firefox rollback messed up violentmonkey

I did a rollback from firefox 57 beta to firefox 56 release with a fresh new install but keeping the profile folder and when I did that on firefox 56 the scripts in violentmonkey appear as loading... in the control panel and they do not function but in firefox 57 they work properly.

I saw on the faq it says that there is an option to export scripts but I was not able to find that only the import button so i was not able to test that workaround.

One drive and dropbox sincronization both fail also.

Show edited script name

When editing script, it would be nice to see the current script name near the title (Script editor probably in English).
It doesn’t need to be dynamically updated when we change the @name in the metadata block, just like the metadata editor’s placeholder is not dynamically updated either.

Tags

I want to suggest the use of tags to mark each version you upload to Opera. Right now it is hard to tell what has changed.

A certain script is not launched in strict mode

Do you think it’s because of Violentmonkey or what ?

Some of my user scripts (mass merge, collection highlighter, spot duplicates, etc.) are not detected as a strict mode script.

"use strict";
if (pipo = 1) { alert(pipo); } // displays 1 instead of crashing

Some other scripts (pending edits, super turbo, etc.) are detected as strict mode scripts with the same test above :

"use strict";
if (pipo = 1) { alert(pipo); } // « ReferenceError: Assignment to unresolved reference in strict mode code: pipo » console error message

Two requests sent for script installation

@gera2ld
So I've been reverifying all the browsers in my arsenal and it appears that Presto with VM is calling on .user.js twice:

GET /install/Marti/RFC_2606%C2%A73_-_Hello,_World!.user.js 200 136.160 ms - -
GET /install/Marti/RFC_2606%C2%A73_-_Hello,_World!.user.js 429 3.932 ms - -

... this is from a click on the Install button on OUJS. e.g. VM on Presto causes our attack prevention to kick in. We don't currently plan on allowing any "free retries" so I was hoping that you could do something about this perhaps in the extension itself. e.g. cache what was first requested and then load that into the script editor.

TIA
OUJS Admin

P.S. Not present in Blink based VM. (at least with 2.2.6... just found out I was behind and needed a manual remove with reinstall... so this part could be inaccurate)

UI: Script count badge not always showing

This issue is a little trickier to explain.

With these animated screen captures please watch the VM icon in the upper right hand corner:

vminstalledscripts1opt

Expected counts per frame:
n/a 1 2 1 1 1 1

Actual counts per frame:
n/a 0 2 1 1 1 0

This may not be the exact reproduced sequence anyone else gets but it gives the general idea of the issue.

Clicking the VM icon usually makes the accurate counts appear. Both scripts are injected and running just not shown with the badge.

Using presumed f512b4e with https://github.com/violentmonkey/violentmonkey-oex/releases/tag/v1.7.0 in Opera/9.80 (X11; Linux x86_64) Presto/2.12.388 Version/12.16

Refs:

Thanks for the look.

Character not loaded

Hello,
I have spotted a (minor issue) with fast-cancel-edits.user.js:

  • Try the URL when Violentmonkey is disabled : the quote characters “” (U+201C and U+201D) are OK.
  • Now try the URL when Violentmonkey is enabled : those characters are replace with �� (U+FFFD REPLACEMENT CHARACTER) once loaded in the installation editor/confirm.

If it’s difficult to solve, just never mind for the moment, as I have scripts with many more characters that load OK. So maybe this script is only using two special characters and that’s why.

Storage data

Hello.

I'm wondering if there's an option to delete the data that scripts place in local storage?
In Firefox that could be accomplished either through Greasemonkey menu, during script removal, or via the "about:config" dialog, by looking for the script name.

I though vacuum data option may do it, but that wasn't what I expected. Also, reinstalling the script doesn't help either.

Stuck on “msgCheckingForUpdate”

I have updated a library called SUPER.js.

This new version was then automatically made available at greasyfork.org (auto‐update).
There, its version went from 61168 to 66008.

Then, in a single later commit, a script, called mb_PENDING-EDITS.user.js, was added the @require …SUPER.js?version=66008 line and another script, called mb_SUPER-MIND-CONTROL-II-X-TURBO.user.js, got its already existing @require …SUPER.js… line, updated version.

Then I have clicked the buttonUpdateAll and all my scripts went OK.
Except those two scripts (the only scripts that are using a lib), that are now stuck on msgCheckingForUpdate and their individual buttonUpdate is still disabled.

script updated

This is a suggestion, maybe it would be nice to have a info box (smae kind as the no grant warning box) that would briefly show up when the daily update check has found some updated scripts. It would present the list of updated scripts.

Metainformation API

It would be great to support either (or both =)) of GM_info or GM_getMetadata. Without them even getting script version is a great problem...

Install scripts from github crashes Opera

I know that Opera 12.18 is not really supported but just in case if you want to see if it crashes on you as well.

When I click the Raw button of a userscript page (any one) in github, it crashes Opera.
Even clicking the raw link above from this very page here, is crashing Opera.
Even copying the URL and pasting it (go) in a new tab, crashes Opera.

It seems that there is no problem with install buttons from GreasyFork or from OpenUserJS sites.

I don’t know if you can do much about it because the same Opera does also crash with some duckduckgo searches (but less systematically)…


If I try the Install from URL work‐around in Violentmonkey with that same Raw URL, I then see an Opera internal error page, saying:

Could not open file
You tried to access the address widget://wuid-f4788697-bf9e-f444-8bca-4df3bc39c84f/[object%20Object], which is currently unavailable. Please make sure that the web address (URL) is correctly spelled and punctuated, then try reloading the page. 

[1.7.2.1] Interface issues

  • Data Export in Settings does not get proper size if there are over 30 scripts in the list.
  • Switching between Installed Scripts, Settings and About is very slow. It was instantenous in 1.6.9.2.
  • There were 4 options in Settings tab in 1.6.9.2. Now there is only 1. Was it your decision to remove options or is it a bug?
  • Custom icons for scripts are not properly displayed. I mean @ICON and @icon64.

Cannot switch user-agent with GM_xmlhttpRequest.

Opera: 12.16 Build 1860
Platform: Debian sid x86_64, 3.2.0-4-amd64
ViolentMonkey: 1.5.0.4

The following userscript pops up ''Opera/9.80 (X11; Linux x86_64) Presto/2.12.388 Version/12.16" rather than "Mozilla/4.0 (compatible) Greasemonkey" on http://whatsmyuseragent.com/.

// ==UserScript==
// @name Set User-agent
// @include http://whatsmyuseragent.com/
// @grant GM_xmlhttpRequest
// ==/UserScript==

GM_xmlhttpRequest({
method: 'GET',
url: location.href,
headers: {
'User-Agent': 'Mozilla/4.0 (compatible) Greasemonkey',
'Accept': '/'
},
onload: function(data) {
var t = data.responseText;
alert(t.substring(t.indexOf('Your User Agent String is:'), t.indexOf('Your IP Address:')));
}
});

UI: Not closing after confirm

prestovmnotclosingafterconfirm

Set the close after installation, exited Opera Presto since it didn't close when initially set, and then went to try out installing a script and it still didn't close.

Many thanks.

Problem with @require library

Using Violent monkey 1.6.9.2.

It seems that something like once a day (probably after auto update check), all my scripts that are using a (specific version?) library are either loosing the library or the library is being corrupt… ?

I had it after holidays (jesus2099/konami-command#140) and found that I just had to reinstall one of the scripts so the library would be loaded OK again but today it happens again (no scripts should have been updated in the meantime).

The three impacted scripts are all using the same library version (unlike my other scripts), and I don’t see anything special with this specific version.

@require https://greasyfork.org/scripts/10888-super/code/SUPER.js?version=70394&v=2015.8.27

Once you go to a page in which they are supposed to run OK, it says, for each script :

Error running script: mb. SCRIPT NAME HERE
ReferenceError: Undefined variable: getParent

getParent being one of the functions from the linked SUPER.js library.

I really need those scripts so I applied my work‐around — which consists in reinstalling only one of the three scripts — this raw button, actually — and they are now working back again, all three.

But it seems I might get this problem back with each auto update check ?
It’s the first time I notice this kind of problem, in 2015 and before I hadn’t seen this.

@gera2ld, do you think my extension storage is full or something like that ?

External editor

I think it’s impossible to access file system from Opera 12 extension but just in case I’m creating this ticket.
It would be ultra awesome to be able to edit scripts through external editor.

I can’t use my beloved EmEditor* from VM for instant edit and test. That’s the only reason I keep using Opera 12’s integrated userjs instead. But I am really missing VM’s autoupdate. :/

(*) sorry linking, some support for this underrated editor is never bad. ;)

Regression on subdomain wildcard in // @match pattern

Hello @gera2ld.
I’m sorry but it seems there is a regression on the // @match behaviour regarding the * wildcard on subdomain (was fixed in #10 but is broken again now).

// @match *://*.toto.fr/*

… means that pages like //titi.toto.fr/papa.html and //toto.fr/papa.html should match.
But now, only first one matches, not second one (no sub‐domain).

Few issues with current HEAD

oujs - Meta View doesn't appear to work in the latest VM-oex.

  • location is undefined... I could work around that by prefixing with window. and temporarily did... however really shouldn't need to e.g. reverted.
  • XMLHttpRequest is undefined ... that is a DOM global used here.

These do (and this script does) work with VM-oex 1.6.9.2 from the Opera store.

TIA

Opera/9.80 (X11; Linux x86_64) Presto/2.12.388 Version/12.16
violentmonkey-oex 1.7.0

Support for multiple @author

At the moment VM is parsing header and matching LAST @author it finds.
Would be nice if it would be consistent with GreaseMonkey/Scriptish/TamperMonkey to match the first one if there are multiple @author's

Thanks in advance.

Some interface bug

The buttons are too small height, and some text is invisible
Opera 12.15 1748 x64 Windows 7
violent

Regards, BanHammer.

Metainfo API provides GM_info as method while it should be an object

GM_info (thanks for fast response) in ViolentMonkey is a method, while it should be an object.
As far as I understand, it should implement getters (to extract metadata just in right time).
I am not 100% sure I obey ViolentMonkey project coding style, so I don't want to create pull request.
For me, following change (using __defineGetter__, as other parts of code use it) succeeded:

addProperty('GM_info',(function(){
    var m=c.code.match(/\/\/\s+==UserScript==\s+([\s\S]*?)\/\/\s+==\/UserScript==\s/);
    m=m?m[1]:'';
    var result = {
        version : widget.version
    };
    result.__defineGetter__('script', function(){
        return {
            description:c.meta.description||'',
            excludes:c.meta.exclude,
            includes:c.meta.include,
            matches:c.meta.match,
            name:c.meta.name||'',
            namespace:c.meta.namespace||'',
            resources:c.meta.resources,
            'run-at':c.meta['run-at']||'document-end',
            unwrap:false,
            version:c.meta.version||'',
        };
    });
    result.__defineGetter__('scriptMetaStr' ,function(){
        return m;
    });
    result.__defineGetter__('scriptWillUpdate' ,function(){
        return c.update;
    });
    return result;
    })()
);

But AFAIK, __defineGetter__ is deprecated, so I suggest (also seems to work ok):

addProperty('GM_info',(function(){
    var m=c.code.match(/\/\/\s+==UserScript==\s+([\s\S]*?)\/\/\s+==\/UserScript==\s/);
    m=m?m[1]:'';

    var result = {
        version : widget.version
    };

    Object.defineProperty(result, 'script', { get: function(){
        return {
            description:c.meta.description||'',
            excludes:c.meta.exclude,
            includes:c.meta.include,
            matches:c.meta.match,
            name:c.meta.name||'',
            namespace:c.meta.namespace||'',
            resources:c.meta.resources,
            'run-at':c.meta['run-at']||'document-end',
            unwrap:false,
            version:c.meta.version||'',
        };
    }});
    Object.defineProperty(result, 'scriptMetaStr', { get: function(){
        return m;
    }});
    Object.defineProperty(result, 'scriptWillUpdate', { get: function(){
        return c.update;
    }});

    return result;
    })()
);

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.