I am trying to replace some code in javascript in this page
but with no luck :-(

In index.php there is javascript with text AC_FL_RunContent and in it there are also this two parameters:

    'width', '100%',
    'height', '100%',

and I need to change it to:

    'width', '8000',
    'height', '8000',

I tried it using replace function, but its not working :-(

    document.body.innerHTML = document.body.innerHTML.replace('\'width\', \'100%\',', '\'width\', \'9999\',');
    document.body.innerHTML = document.body.innerHTML.replace('\'height\', \'100%\',', '\'width\', \'9999\',');

Thanks very much for help.

Why not inject some CSS into it the pages with !important tagged onto the rules you need?

See GM_addStyle or if you choose to inject it into the page a style tag.

To tell the truth, I dont know how :-( would you be so kind and write it down for me? Thank you very much...

This method adds a string of CSS to the document. It creates a new <style> element, adds the given CSS to it, and inserts it into the <head>

mentioned java script is not in head tag, its defined in div tag at the end of page :-(

Re: @victorc:

GM_addStyle is usually for beginners and a shortcut to adding it by hand to the head tag... so once you determine what node in the DOM (the web page source) you can do something like body { color: white !important; background-color: black !important; } ... or in your case the rules would be { width: 8000px !important; } and { height: 8000px !important; }.

Since I am not sure where you want this in the DOM exactly you'll have to find the selector.

Re: @victorc:

If you are trying to maximize the width on that post the selector could be #fileinfo... but that may not cover all posts... so putting the CSS rules altogether:

#fileinfo { width: 8000px !important; height: 8000px !important; }

This assumes that you need the !important flag too... I just did it in Firebug directly and it doesn't appear to need it... so you could omit those.

Thank you for help, so I created userscript with this code

// ==UserScript==
// @name        MZA Indikacni skici - scrollbars
// @namespace   http://www.mza.cz/indikacniskici/
// @description 
// @include     http://www.mza.cz/indikacniskici/index.php*
// @version     1
// @grant       none
// ==/UserScript==

// http://www.freeformatter.com/javascript-escape.html

// 'width', '100%',
// 'height', '100%',
// 'allowFullScreen', 'false',

#fileinfo { width: 8000px !important; height: 8000px !important; allowFullScreen: true !important }

but it didnt work... :(
All I need to do is to make both scrollbars visible and set resolution of screen workspace to at least 8000x8000 so that I can capture the picture in fullres...

Re: @victorc:

but it didnt work...

That's because you didn't do it with GM_addStyle as I linked above... you'll need to @grant that API function too in the UserScript metadata block in order to use it. A more advanced technique is getting the head tag and inserting a style tag in yourself in which case you wouldn't need the @grant which sandboxes your scripts usually.

Re: @Marti:
thank you for help!!! it works now ;-)

// ==UserScript==
// @name        MZA Indikacni skici - scrollbars - 9999x9999
// @namespace   http://www.mza.cz/indikacniskici/
// @description Nahradi rozliseni 100%x100% za 9999x9999 aby mohl byt obraz zachycen pomoci napr. Fireshot addonu
// @include     http://www.mza.cz/indikacniskici/index.php*
// @version     1
// @grant       GM_addStyle
// ==/UserScript==

GM_addStyle("body { width: 8000px !important; height: 8000px !important; allowFullScreen: true !important } ");