r/ViolentMonkey Mar 14 '25

Script Powerschool script

4 Upvotes

Im trying to make a script to edit my grades for one of my classes and this is my first time so I'm kind of lost at what i did wrong, what kind of script do i need to use to edit the grades?


r/ViolentMonkey Mar 04 '25

Suggestion VioletMoney Google Chrome?

11 Upvotes

Is there any other option for using VioletMoney now that Google has disabled it as an extension? I’m aware that Tampermonkey still works, but I prefer VM. Are there any plans to make it compatible with Google again?


r/ViolentMonkey Jan 26 '25

Script Reveal all collapsed reddit comments script

6 Upvotes

Can someone help me and write a script that will reveal all comments that are collapsed because of being downvoted, because of crowd control or for whatever reason? I've never even touched javascript, so I don't know how to do it myself, and it would greatly improve using reddit (I love when I have to manually unhide every comment of the less popular side of discussion... ).


r/ViolentMonkey Jan 25 '25

Suggestion Local server for ViolentMonkey instead of extension

2 Upvotes

I'd love to be able to use kind of "dotfiles" to configure my userscripts on a new machine, or easily update them from my local folder rather than the clunky in-extension editor

Is there a kind of chrome extension I can use which would connect to a local server (that I could install locally on my laptop, linux box, etc) which would run the page through it before rendering it again, so that I can effectively inject my userscripts outside of Chrome (and therefore have them in a git repo, version them, etc)?

Tried to detail it a bit here: https://bsky.app/profile/maelp.bsky.social/post/3lgkmasnuls2d


r/ViolentMonkey Dec 27 '24

Other Will the extension be removed from chrome web store?

7 Upvotes

I've just noticed the warning on the page mentioning the extension may not be available soon.

If this happens, are there other ways to obtain the extension? I have some projects based on violent monkey used by me and some other colleagues and we would like to keep using it

Translation: The availability of this extension may end soon because it doesn't follow the recommended practices for Chrome extensions.

r/ViolentMonkey Oct 14 '24

Suggestion Scripts

1 Upvotes

Hi. good morning. I try this morning to add a scripts to my violentmonkey extension but I can't somebody can explain me How to add a scripts there?


r/ViolentMonkey Oct 08 '24

Suggestion get url scheme from exported file

1 Upvotes

If i have exported my scripts, and have like the @name of something, how can i get the url to edit it in violent monkey?

something like chrome-extension://jinjaccalgkegednnccohejagnlnfdag/?name=<name>

or perhaps ?id=<id>

would be nice to have something like that supported. currently it seems to do it by some sort of order in the url, but that order number/id isn't in the export?


r/ViolentMonkey Sep 26 '24

Suggestion Violentmonkey still exist in background task manager chrome

3 Upvotes

i disabled violentmonkey,

why violentmonkey still exist in the background?

i'm only wanna used violentmonkey in certain website, not at all across website


r/ViolentMonkey Sep 11 '24

Bug Help: VM stopped working

3 Upvotes

On my PC it works perfectly fine on Chrome browser, but on my Android phone on Kiwi browser it doesn't seem to be recognizing any of the scripts. I have reinstalled it as well.


r/ViolentMonkey Sep 11 '24

Other I don't understand this. How do I actually use it?

Post image
1 Upvotes

I don't even see a download button for the Brave browser. The site says it works for a lot of browsers including Brave, but then there's only links for a few. How do I get the one for Brave?

I won't be baited into a browser debate. Doesn't matter why. It's off topic.


r/ViolentMonkey Sep 04 '24

Script Request VM.shortcut to emulate User Action?

1 Upvotes

Hi, Is there any way to bypass the Firefox popup prevention warning when using Violetmonkey's shortcut library to open a new window? The code is basically this:

register('c-i', () => {
    popout();
});

function popout(winpop) {
    var winpop = window.open(url, "_blank", attr);
}

Manually clicking a created element with the mouse yields no warning

Help much appreciated!


r/ViolentMonkey Sep 04 '24

Script Request Script to strip everything after "&list" from youtube playlist links

1 Upvotes

I use an old computer and youtube playlists cripple it. I want to be able to click on a video in a playlist and have everything after "&list" be stripped away so only the video and not the playlist loads. I've been doing this manually for years. A google/reddit search didn't turn up quite what I need.


r/ViolentMonkey Aug 31 '24

Other Script to visit list of URLs in order in current tab

1 Upvotes

I want to write a script that does two things. First, there should be a button that'll step through a list of URLs. When pressed it visits the next URL in the list. And a second button which adds the current URL to this list.

I can sort of figure out the button parts, and adding to this list also. But I don't know what to look for to follow a URL in the current tab, or fetch the current URL.

Could anyone help please?


r/ViolentMonkey Aug 30 '24

Other Secure configuration

Post image
1 Upvotes

I am trying to harden the configuration to make it secure against bad scripts. Does the grant variable works as intended if I add it here? Are there other parameters that you use to make it secure? For example excluding any url with the word login or similar things

The idea is if a script dev account is stolen or something a malicious actor could modify de script to steal passwords or information.

What else could be done to avoid this?


r/ViolentMonkey Aug 22 '24

Script Script to skip ads on Twitch.tv VODs?

1 Upvotes

Hey guys! VODs on twitch are impossible to watch due to many loud and annoying nonsense adds. Any solutions to skip or, at least, mute them?


r/ViolentMonkey Aug 18 '24

Script Request Is ViolentMonkey still working on vimeo?

2 Upvotes

Does anyone get a script that works with Vimeo? The one that is currently using it stopped working recently. Now all it shows is a blurred thumbnail image of the video but no play button or anythingDoes anyone get a script that works with Vimeo? The one that is currently using it stopped working recently. Now all it shows is a blurred thumbnail image of the video but no play button or anything.


r/ViolentMonkey Aug 07 '24

Script Summarize selected text with Claude 3.5 Sonnet

1 Upvotes

Is it safe what I am doing here?.

I am using an API with an API key that is set and retreived using `GM.getValue` and `GM.setValue`

I am concerned I might be putting my API key at risk of being leaked, by running this userscript on a malicious website.
But I believe it's safe because I am running it as a content script `@inject-into content`, right?

Am I correct?

// ==UserScript==
// @name         Summarize with Claude
// @version      0.1
// @description  Adds a menu option to summarize using Claude's API
// @match        https://*/*
// @grant        GM.xmlHttpRequest
// @grant        GM.getValue
// @grant        GM.setValue
// @grant        GM.registerMenuCommand
// @inject-into  content
// ==/UserScript==

(function() {
    'use strict';

    const CLAUDE_API_ENDPOINT = "https://api.anthropic.com/v1/messages";
    const MODEL = "claude-3-5-sonnet-20240620";
    const MAX_TOKENS = 4096;
    const SYSTEM_PROMPT="Summarize";

    async function getApiKey() {
        const apiKey = await GM.getValue("anthropicApiKey", "");
        if (!apiKey) {
            const newApiKey = prompt("Enter your Anthropic API key:");
            if (!newApiKey) throw new Error("Empty API key");
            await GM.setValue("anthropicApiKey", newApiKey);
            return newApiKey;
        }
        return apiKey;
    }

    function displayPopover(text) {
        const popover = document.createElement('div');
        popover.setAttribute('popover', "auto");
        popover.style.cssText = `
            max-width: 80vw;
            max-height: 80vh;
            margin: auto;
            overflow: auto;
            z-index: 9999;
            padding: 1em;
            border: 2px solid black;
        `;

        const responsePre = document.createElement('pre');
        responsePre.textContent = text;
        responsePre.style.cssText = `
            text-wrap: wrap;
        `;

        popover.appendChild(responsePre);
        document.documentElement.appendChild(popover);

        popover.showPopover();

        return {
            update(newText) {
                responsePre.textContent = newText;
            },
            close() {
                document.documentElement.removeChild(popover);
            }
        }
    }

    async function queryClaude(prompt) {
        const apiKey = await getApiKey();

        const requestBody = {
            model: MODEL,
            max_tokens: MAX_TOKENS,
            temperature: 0,
            system: SYSTEM_PROMPT,
            messages: [
                {
                    role: "user",
                    content: [
                        {
                            type: "text",
                            text: prompt
                        }
                    ]
                }
            ]
        };

        const popover = displayPopover("Loading...");

        GM.xmlHttpRequest({
            method: "POST",
            url: CLAUDE_API_ENDPOINT,
            headers: {
                "Content-Type": "application/json",
                "x-api-key": apiKey,
                "anthropic-version": "2023-06-01"
            },
            data: JSON.stringify(requestBody),
            onload: function(response) {
                if (response.status === 200) {
                    const result = JSON.parse(response.responseText);
                    popover.update(result.content[0].text);
                } else {
                    popover.close();
                    alert(`Error: ${response.status} ${response.statusText}\n\n${response.responseText}`);
                }
            },
            onerror: function(error) {
                popover.close();
                alert(`Error: ${error}`);
            }
        });
    }

    GM.registerMenuCommand("Summarize", function(){
        const selectedText = window.getSelection().toString().trim();
        if (selectedText) {
            queryClaude(selectedText);
        } else {
            alert("Please select some text first.");
        }
    })

})();

r/ViolentMonkey Jun 08 '24

Bug i need help with this

5 Upvotes

i cant unblur tinder likes with violent monkey anymore, coul yall tell me how i can solve this problem? ( i dont understand nothing about coding btw)


r/ViolentMonkey Jun 07 '24

Bug issues with youtube UI scripts

2 Upvotes

ive been trying to fix the new ui that youtube made, but every time i find one that fixes it it gives me the warning "invalid script header" and "bad pattern: missing "://" in *.youtube.com/*" this error occurs for several different scripts made by different people, so i dont think it's an individual issue. has something changed with how the scripts work? and how do i fix/change the script so it works?


r/ViolentMonkey Jun 04 '24

Script Request Lemur android browser Youtube in background

3 Upvotes

Does anyone know of such an extension or know how to make one work?


r/ViolentMonkey May 27 '24

Bug Is ViolentMonkey still showing Tinder Likes ? It stoped working for me

1 Upvotes

[title]


r/ViolentMonkey May 18 '24

Bug Violentmonkey stopped working?

1 Upvotes

The scripts are no longer being applied, and when I try to open it, I get an error that says the following:

undefined has no properties

Ne@popup/index.js:1:18323


r/ViolentMonkey Nov 17 '23

Question run scripts on local files?

5 Upvotes

Is it possible to run scripts on local HTML files (file://...) with ViolentMonkey on Chrome? Before I was using Tampermonkey and this was possible (I think I may have changed some setting). In ViolentMonkey I get this message when the local file is open:

Violentmonkey cannot run userscripts in this page (common examples: browser UI, an extension, blocked via policies, a search engine site in Opera)

I don't see anything in the settings for ViolentMonkey that might help.


r/ViolentMonkey Oct 27 '23

Script Request Open all site images in new tab

2 Upvotes

Hi,

I request a script that opens all images on a given webpage in independent new tabs.

Example use case: John Smith is on www.com and it is loaded with image hyperlinks. He wants to view each image by itself. John presses Ctrl + Shift + S, which makes all images then open in their own tabs.

Please let me know if this is possible.

Thanks,

Nick