Greasy Fork is available in English.

Highlight Every Code

Add a icon to popup a window that allows syntax highlighting and beautify and word count of source code snippets on current page

< Feedback on Highlight Every Code

Review: Good - script works

§
Posted: 2022-01-06

Good idea, but can you improve it?
1 - The result open a new Tab (in my test for me, it open in the last tab on 40 tabs...):
Can you open it in an iframe / Modal / popup?.
Can you detect each code in a page to add always the Highlight icon (without the need to remember if i have a script installed for that)

hoothinAuthor
§
Posted: 2022-01-06

Like <pre> or <code>? It's a nice plan, I'll try.

§
Posted: 2022-01-06

Haa...thanks.

I wait for the next update!
I test many userscripts like your and i often forget that i can use them because:
- I don't need them all the day and nothing is visible to signal i can use them (icon etc...)
- Because i need some special Keys (and whithout it no function).

§
Posted: 2022-01-06

Tested after update:

Seems on the good direction (for me)...
But if the result open in an independant windows, it is blank!

And now i see your icon when i hover a code!
Just it work bizarrely:
on your script page it work (when hover your test case) but very briefly.
Work better on this page:
Original solution by opening the edit rule form in the script page itself!

But i don't know if it due to an other script or my usersyles...
Maybe it's only a pb for me.

hoothinAuthor
§
Posted: 2022-01-06

Can you tell me your environment? I test on chrome & firefox only. The icon will disappear when mouse scroll or click down on other positions.

§
Posted: 2022-01-07

Haa sorry, i forgot:
Waterfox Classic and greasemonkey v.3.17

Maybe it's due to that configuration...
;-)

hoothinAuthor
§
Posted: 2022-01-07

Fixed. the reason is unsafeWindow is needed on Waterfox.

§
Posted: 2022-01-07

That's good now:
I see the result in the popup.

The only problem now is the icon:
There is a general one (top / left of the page) which is an indicator of code in the page

And an other one when we select the code desired with one of the possible key (i use ALT).

The general indicator should be "inactive" (just an indicator we can use your script by select a particular code)?:
I said that because clicking on it (without select a code) open a Blank popup.

I see now that when selecting a code without a key work if we click after on this "general" icon...

So... i don't have the solution:
Maybe only one icon which appear on each code in the page (should be too visually invasive if too many code in the page)???
Or something else...

But like that your script work, just need to understand the better process to use it.

Thanks for this update.

hoothinAuthor
§
Posted: 2022-01-08

Now we can change the function key config on the script page.
Just click on the key words like (Alt key) (Ctrl key).
And I move the custom input function to command menu.
I need the icon show when select something as some code isn't in the pre tag always.
You are a so nice user for me. Regards.

§
Posted: 2022-01-08
Edited: 2022-01-08

;-)
work fine!

- The way to change the key in the script page is original too.
"I move the custom input function to command menu":
To change this Key ?

Post reply

Sign in to post a reply.