Ruud14 / Page-Manipulator

Browser Extension that can automatically inject custom HTML, CSS or JavaScript into any web-page. This way you can customize any web-page to fit your needs. Currently available on Google Chrome and Microsoft Edge.
https://chrome.google.com/webstore/detail/page-manipulator/mdhellggnoabbnnchkeniomkpghbekko?hl=nl
90 stars 31 forks source link

How do I save inspect element changes permanently in Chrome? #15

Closed Brown946 closed 2 years ago

Brown946 commented 2 years ago

Hi please, I'd like to change PERMANENTLY the value 1.47 but I don't know the css code to put on "page manipulator" chrome extension, can help someone please ?

I changed value but only in my screen but not permanently, refresh page shows value 1.47 not my own value I changed before which was 983 899,54

<div class="tv-account-manager__data js-collateral-value">1.47</div>

Ruud14 commented 2 years ago

You don't need any CSS for this, use JavaScript instead.

In Page Manipulator create a JavaScript file,

  1. Check the active checkbox.
  2. Put the URL of the website in the 'Active websites' textarea.
  3. Set 'Matching pages' to recursive.
  4. Put this code in the file:
    // Find all elements with 'tv-account-manager__data' as one of its class names.
    var elementsWithThisClassName = document.getElementsByClassName("tv-account-manager__data");
    // Check all those elements to see whether their value is "983 899,54".
    for (var i = 0; i < elementsWithThisClassName.length; i++) {
    // If that is the case we change it to "1.47"
    if (elementsWithThisClassName[i].innerHTML  == "983 899,54") {
        elementsWithThisClassName[i].innerHTML = "1.47"
    }
    }

    I hope the comments (indicated by the grey lines starting with '//') can help you understand the code.

Brown946 commented 2 years ago

hi Ruud14: thank you so much for explications - I understand good the code

I did exactly what you wrote but same result after "RELOAD" on "page manipulator" - the website showed 1.47 value..

Could I send you by mail .pdf file for good understand what I meaned ?

Ruud14 commented 2 years ago

Sure, go ahead. My email is on my main Github page.

Miekviper1 commented 2 years ago

hi! I have an incremental game where there are values that I cannot find and/or change... Could someone help me with understanding how to change these values?

Ruud14 commented 2 years ago

Whether or not it is possible to change the values depends on how the game is built. Please elaborate on the game and the values you're trying to change, and I might have some time to look at it.

Miekviper1 commented 2 years ago

Hiya, Here are the two games, quite similar in theme, I'm not quite sure if it differs in code. fishgame https://coshxx.github.io/fishgame/#/tab/fish/fish, fg2share https://coshxx.github.io/fg2share/. What I would like to change is the value/number of the tickspeed. This could be the rate or time of the fishing session on the second game or the tickrate of the office worker and fish per second in the first game.

I've been searching around the console and exploring google to see if anyone had 'decoded' the save, but this has never come to a satisfactory conclusion.

Would you be able to help? It would be great if you could and if you could shed some light on changing code could also help me personally.

Thanks a lot! Mieky.

On Tue, Jun 7, 2022 at 6:07 AM Ruud Brouwers @.***> wrote:

Whether or not it is possible to change the values depends on how the game is built. Please elaborate on the game and the values you're trying to change, and I might have some time to look at it.

— Reply to this email directly, view it on GitHub https://github.com/Ruud14/Page-Manipulator/issues/15#issuecomment-1147865893, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZKNLHBLIDJ5UNBOAG3ET3DVNZLA3ANCNFSM5LSIOQOQ . You are receiving this because you commented.Message ID: @.***>

Miekviper1 commented 2 years ago

Hi, have you been able to look at these two games? thanks.

On Tue, Jun 7, 2022 at 10:17 AM Fuel Injected, Jacked Peach Thats Name Is Fuzzy @.***> wrote:

Hiya, Here are the two games, quite similar in theme, I'm not quite sure if it differs in code. fishgame https://coshxx.github.io/fishgame/#/tab/fish/fish, fg2share https://coshxx.github.io/fg2share/. What I would like to change is the value/number of the tickspeed. This could be the rate or time of the fishing session on the second game or the tickrate of the office worker and fish per second in the first game.

I've been searching around the console and exploring google to see if anyone had 'decoded' the save, but this has never come to a satisfactory conclusion.

Would you be able to help? It would be great if you could and if you could shed some light on changing code could also help me personally.

Thanks a lot! Mieky.

On Tue, Jun 7, 2022 at 6:07 AM Ruud Brouwers @.***> wrote:

Whether or not it is possible to change the values depends on how the game is built. Please elaborate on the game and the values you're trying to change, and I might have some time to look at it.

— Reply to this email directly, view it on GitHub https://github.com/Ruud14/Page-Manipulator/issues/15#issuecomment-1147865893, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZKNLHBLIDJ5UNBOAG3ET3DVNZLA3ANCNFSM5LSIOQOQ . You are receiving this because you commented.Message ID: @.***>

Ruud14 commented 2 years ago

Yes, I have. I forgot about it as you had commented this on a closed issue, my apologies.

Usually, when trying to change something in such a browser game, one would look at the javascript code of said game to find variables worth changing. This can be done by opening the browser devtools and then going to 'sources'.
Once said variables have been found, one could go to the 'console' and try manually changing those variables and see if it really produces the desired output.

For these two games however, it is more complicated as the javascript has been obfuscated. This means that the author has purposefully made the code difficult to read for people like you and me by removing the overal structure of the code and replacing all variable names with nonsense.

There exist tools like these to deobfuscate the code but this doesn't get rid of the nonsense variable names. I'd suggest you to watch this to learn more about deobfuscation.

If you eventually manage to find variables to change, you could automate changing those variables by injecting a piece of javascript code using this chrome extension.

TL;DR The developer has made it quite difficult for you to find variables to change. This doesn't make it impossible, but you'll have to put in a lot of work and trial and error to find the right variables to change. After finding the variables, changing them could be automated using this extension.

Hope this helps,

Ruud Brouwers

Miekviper1 commented 2 years ago

All good. Thanks, I'll check it out. Also, did you link the chrome extension? sorry if you did and i'm just blind lol. If not please let me know what it is. Thanks!!

On Tue, Jul 12, 2022 at 5:05 PM Ruud Brouwers @.***> wrote:

Yes, I have. I forgot about it as you had commented this on a closed issue, my apologies.

Usually, when trying to change something in such a browser game, one would look at the javascript code of said game to find variables worth changing. This can be done by opening the browser devtools and then going to 'sources'. Once said variables have been found, one could go to the 'console' and try manually changing those variables and see if it really produces the desired output.

For these two games however, it is more complicated as the javascript has been obfuscated. This means that the author has purposefully made the code difficult to read for people like you and me by removing the overal structure of the code and replacing all variable names with nonsense.

There exist tools like these https://deobfuscate.io/ to deobfuscate the code but this doesn't get rid of the nonsense variable names. I'd suggest you to watch this https://www.youtube.com/watch?v=Ka8PXERJ-Fs to learn more about deobfuscation.

If you eventually manage to find variables to change, you could automate changing those variables by injecting a piece of javascript code using this chrome extension.

TL;DR The developer has made it quite difficult for you to find variables to change. This doesn't make it impossible, but you'll have to put in a lot of work and trial and error to find the right variables to change. After finding the variables, changing them could be automated using this extension.

Hope this helps,

Ruud Brouwers

— Reply to this email directly, view it on GitHub https://github.com/Ruud14/Page-Manipulator/issues/15#issuecomment-1181395206, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZKNLHD7OWRFOWPXITYZTK3VTUKJ7ANCNFSM5LSIOQOQ . You are receiving this because you commented.Message ID: @.***>

Ruud14 commented 2 years ago

You're commenting this on the issue page of the extension that we're talking about.

Miekviper1 commented 2 years ago

Sorry, I was replying through email!

On Wed, Jul 13, 2022 at 7:11 PM Ruud Brouwers @.***> wrote:

You're commenting this on the issue page of the extension that we're talking about.

— Reply to this email directly, view it on GitHub https://github.com/Ruud14/Page-Manipulator/issues/15#issuecomment-1182970543, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZKNLHEYGAZ6PPACD7UKP5LVT2B43ANCNFSM5LSIOQOQ . You are receiving this because you commented.Message ID: @.***>

Tithe108 commented 2 years ago

Hello I am trying to change this text on a grade I have and I have tried the chrome extension changer and it is not working. If I could have any sort of help it will help me very much in not getting kicked out. If you find it more comfortable talking through email mine is o.bradley00@gmail.com

Ruud14 commented 2 years ago

Changes will only be visible on your computer, so unless your grade is being looked at on your screen, it will unfortunately not work.

yousaaf commented 2 years ago

How to save the elements in inspect element on youtube video