Pergunta

I have one maybe stupid question but my googling skill were not up to the task.

I have some html page that I opet at my work that is php generated. On it 80% of the text is not needed for me so I "made" a javascript code that filters/hides all text I am not interested in. It works just fine but for this to work I must SAVE html document on my computer and insert that javascript code into it so it can make text invisible. Now I am thinking of improving this because every time I reload web page on my company's server I need to save it on computer and insert javascript code. Please point me into the direction that can help me do this. Is there any way to run that javascript code over already opened page in FireFox or some other browsers?

Html page that I am changing is mostly tables and I am hiding rows that I do not need, but there aro around 500 rows and I only need 15 or 20.

Thank for all your effort!

Foi útil?

Solução

One way would be to use a 'bookmarklet'. Those are small javascript snippets, which you can insert into your bookmark bar and then execute by clicking on them.

<a href="javascript:(function(){alert(1);})()">Drag me to bookmarks for alert</a>

For Example, drag the link in this fiddle into your bookmark bar and it will alert 1 on click. http://jsfiddle.net/5aAPN/2/

Outras dicas

Use CSS instead. If you have a white background make the text white. You can also give visibility: hidden a try.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top