Script not run
See original GitHub issueWhat is the problem?
my script does not run and it give me this message “Sub-frames only scripts: 1”
How to reproduce it?
- create a new script
- paste this
// ==UserScript==
// @name Google Tweak
// @namespace local.google
// @match *://*google.com/*
// @grant none
// @version 1.0
// @run-at document-idle
// @author bokunocode
// ==/UserScript==
;
(function() {
'use strict';
document.querySelectorAll("a").forEach(function(a) {
a.onmousedown = null;
a.onclick = null;
console.log(a)
});
});
- toggle script on and off, refresh the page.
What is the expected result?
event on all a elements, removed.
What is the actual result?
nothing happen,
What is the result in the upcoming release?
i’ve tried both stable and beta from chrome web store
Environment
- Browser: Opera
- Browser version: Opera 77.0.4054.277
- Violentmonkey version: Version 2.12.14.1
- OS: Linux Arch
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
javascript - JS script not running? - Stack Overflow
The script requires jQuery. The variables with $ are trying to create jQuery objects from the selector that is passed as ...
Read more >Don't know why the script is not running - JavaScript
I have tried to open it as a local file instead with Chrome, but still didnt work. Can someone tell me why is...
Read more >A script takes too long to run or is not responding - IBM
A script takes too long to run or is not responding. When using z/OSMF, you might encounter the long-running script dialog, which means...
Read more >Why does the RUN button not work for my script? - MathWorks
The 'Run' button is green, and presses down like normal, but the script does not execute. Running the code line-by-line works fine, and...
Read more >I am getting an error that I should not run script as root
Look, you are signed in as the root user: root@levono. Type sudo su YOURUSERNAME it will be changed to. YOURUSERNAME@levono. then execute ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

We don’t write anything to that console normally because most users have no idea how to access it. You can compile a debug build from source and there will be many messages there. However, Violentmonkey doesn’t inject its scripts explicitly when using the default (page) mode (more info), it’s only for the
contentmode that you will see an error there when injection fails.Anyway, the next version tests injectability in the popup and displays the message accordingly.
@tophf
not in console of current tab. in debug console. open this in firefox
about:debugging#/runtime/this-firefoxbecause I just faced some weird behaviour. i’m not sure its either failed to inject or the script is faulty. i tried to make a script with
setTimeoutand it does not run at all. violetmonkey also didn’t log anything. i’m confused. i can provide some screenshot if needed.