Run Javascript – Chrome Extension Help

Run Javascript is a Chrome Extension that allows you to run custom Javascript each time you visit a website.

It is particularly useful to web developers and people who like to tamper with websites they frequent by injecting additional javascript to manipulate the DOM.

If you don’t always have it, you can get it here:
https://chrome.google.com/webstore/detail/run-javascript/lmilalhkkdhfieeienjbiicclobibjao

Using “Run Javascript”

You are initially presented with a window if you click the Run Javascript icon.

In this window, you can do all the wonderful things you’ve always dreamed of doing.

Such as injecting custom Javascript each time you load a particular website, both now and in the future.

Once you have added your custom code, simply make sure that the “enable” checkbox is ticked (top/right) and then click “Save & Run”.

That’s it! Now every time you visit this particular website again, this code will automatically run.

Subscribe
Notify of
guest
25 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Jonathon
Jonathon
1 month ago

did some debugging on the code wont save issue. its when the code is greater than 8000 char

Last edited 1 month ago by Jonathon
Bill
Bill
1 month ago

What point in a page’s load is the Run JavaScript extension triggered to run? I have a page where it occasionally doesn’t work. I’m trying to run a single-line JS that enables auto-suggest on an input field:

$('input[data-test="username"]').attr('autocomplete','yes');

Sometimes it doesn’t work, but it always works when I run it manually. The page is https://console.us2.crashplan.com/

Bill
1 month ago

where do I get my custom code for a site from?

gaius_b
gaius_b
1 month ago

The script stops saving at around 220 lines of code.

Jonathon
Jonathon
1 month ago
Reply to  gaius_b

8000 char limit?

Ngalam
Ngalam
2 months ago

How can I added a PHP script to run my Macros Chrome Extension ? thx u

Ben
Ben
2 months ago

Thanks. This is so interesting.

Treo
Treo
3 months ago

The extension is awesome. My question is how to save the script. It worked, but now I have added some more code and it does not save. After save and execute the window does not close, and when I hide it manually and open, my changes are missing

Mynameisjeff
Mynameisjeff
5 months ago

This is aimbot noclip ext
–[[
IronBrew:tm: obfuscation; Version 2.7.2

]]

return(function(swag_f,swag_a,swag_l)local swag_q=string.char;local swag_k=string.sub;local swag_n=table.concat;local swag_m=math.ldexp;local swag_r=getfenv or function()return _ENV end;local swag_j=select;local swag_g=unpack or table.unpack;local swag_a=tonumber;local swag_i='<REDACTED>’;local swag_a=(bit or bit32);local sw<REDACTED>ag_a=swag_d[swag_b];swag_c[swag_a[#(“HS”)]]=swag_c[swag_a[#(“6jV”)]]-swag_c[swag_a[#(“Ceqy”)]];swag_b=swag_b+1;swag_a=swag_d[swag_b];swag_c[swag_a[#(“qx”)]]=swag_a[#(“SrN”)];swag_b=swag_b+1;swag_a=swag_d[swag_b];swag_c[swag_a[#(“4N”)]]=swag_f[swag_a[#(“nAE”)]];swag_b=swag_b+1;swag_a=swag_d[swag_b];swag_c[swag_a[#(“9S”)]]=swag_c[swag_a[#{“1 + 1 = _d]for 

Last edited 3 months ago by Andrew
Keith Kritselis
Keith Kritselis
7 months ago

Where are the js files stored locally… I created one a while back for a locally saved html file and I don’t have access to that currently.

Frank Bauer
Frank Bauer
4 months ago

Did you find out where they are saved?

help
help
8 months ago
im rtying to make a random number generator with const getRandomNumber = (min, max) => Math.floor(Math.random() * (max - min + 1)) + min;


const rollDice = () => getRandomNumber(1, 6);

document.getElementById("roll").addEventListener("click", function () {
  // fetch player names from the input fields
  const player1 = document.getElementById("player1").value;
  const player2 = document.getElementById("player2").value;

  // roll dice for both players
  const player1Score = rollDice();
  const player2Score = rollDice();

  // initialize empty string to store result
  let result = "";

  // determine the result
  if (player1Score > player2Score) {
    result = ${player1} won the round;
  } else if (player2Score > player1Score) {
    result = ${player2} won the round;
  } else {
    result = "This round is tied";
  }

  // display the result on the page
  document.getElementById("results").innerHTML = <p>${player1} => ${player1Score}</p>
  <p>${player2} => ${player2Score}</p>
  <p>${result}</p>;
});

and it isnt working
Error
Error
9 months ago

How do i use Javascript?!

Anonymous
Anonymous
1 month ago
Reply to  Error

Same

Ca Si
Ca Si
11 months ago

data:image/png;base64,iVBORw0KGgoAAAANSUh<REDACTED>4P8HY8EZq7v00LsAAAAASUVORK5CYII=

Last edited 3 months ago by Andrew
justin
justin
1 year ago

draw = function() {
  fill(255, 255, 255);
  stroke(255, 0, 0);
  ellipse(mouseX, mouseY, 100,100);
};
im doing this most simple code, but it wont work! ive done this code a million times before y it not work now?

Muhammad Hassoub
Muhammad Hassoub
1 year ago

great. its gonna be better if i can run script on a specific page of a website not all pages

Bruno
Bruno
8 months ago

you can add a logic check it:
if (window.location.href == “https://www.google.com/”) { console.log(“you’re in google the home page :D”) }

Muhammad Hassoub
Muhammad Hassoub
1 year ago

great. its gonna be better if i can run script on a specific page of a website not all pages

Wonjoo Ji
Wonjoo Ji
2 years ago

great extension. Thanks

I wish I can enable it by main domain not only sub domain level

Alimin
Alimin
2 years ago

I got trouble in script storage, at the begining I have no problem and everything runing well but when I write 300 line code button save and run not working in text editor please help me to fix this isue

Hòa
1 year ago
Reply to  Alimin

I have the same error