Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

HackForums userscript - Code box select all [1.1.4]

Hey,

As requested https://hackforums.net/showthread.php?tid=2884233 . After many hours of testing (been programming in javascript for only one day now) and lots of stress I finally got it working.

This userscript allows you to select all the text in the codebox by simply clicking the link/button.

[img]http://i.minus.com/jbe24akHI32wFl.png[/img]

You need tampermonkey to use this!
Only fully tested on Google Chrome, I have tested it on Firefox and it worked but I haven't fully tested it fully for bugs.

Link: http://userscripts.org/scripts/show/147513

Please report any bugs if you find them,

Enjoy.
FR1908
Ehm, there's already a mod for MyBB that you can easily implement for this...
(Mar 3, 2013 05:48 AM)Devil Driver Wrote:  Ehm, there's already a mod for MyBB that you can easily implement for this...

Omniscient said he wasn't going to install it..

EDIT: https://hackforums.net/showthread.php?ti...id26647998
FR1908
I was seriously thinking about creating that last night.

That is fucking creepy as hell to see that someone else did it. Hah!

Thanks, OP, for saving me the time. 🙂 I shall extensively use, and abuse this GS script now. :wink:

EDIT: Quick test on Firefox

Code
std::cout << "Horray OP!!!";

EDIT: Test... successful... Works like a charm. Thanks!!

Third edit: Hey. This is just for anyone who might actually use it (I am loving it so far.. I should've done it sooner, haha).
If you want the text colored, here's a simple fix to turn it black.
Code
newHTML = 'Code: <a href="javascript:void(0);" id="'+ id +'"><FONT COLOR="0066CC">[Select All]</FONT></a><br>';

Here's a link to a basic HTML color generator so you can generate whatever color you want to slap on it:
- http://www.w3schools.com/tags/ref_colorpicker.asp

Example of the modification:
[Image: aba6dtz.jpg]
Is there any such thing as a woman of honor, and sincerity?

https://www.PutItOnMute.com/

4K HDR, WDR time-lapsed truck driving videos!
(Mar 3, 2013 06:26 AM)Irritiable Wrote:  I was seriously thinking about creating that last night.

That is fucking creepy as hell to see that someone else did it. Hah!

Thanks, OP, for saving me the time. 🙂 I shall extensively use, and abuse this GS script now. :wink:

EDIT: Quick test on Firefox

Code
std::cout << "Horray OP!!!";

EDIT: Test... successful... Works like a charm. Thanks!!

Third edit: Hey. This is just for anyone who might actually use it (I am loving it so far.. I should've done it sooner, haha).
If you want the text colored, here's a simple fix to turn it black.
Code
newHTML = 'Code: <a href="javascript:void(0);" id="'+ id +'"><FONT COLOR="0066CC">[Select All]</FONT></a><br>';

Here's a link to a basic HTML color generator so you can generate whatever color you want to slap on it:
- http://www.w3schools.com/tags/ref_colorpicker.asp

Example of the modification:
[Image: aba6dtz.jpg]

<style="color:#BLAH;">content</style>

Font tags should not be used. 🤝
(Mar 3, 2013 09:18 AM)Han. Wrote:  <style="color:#BLAH;">content</style>

Font tags should not be used. 🤝

You are saying that HTML should not be used across the internet anymore? ❓
Is there any such thing as a woman of honor, and sincerity?

https://www.PutItOnMute.com/

4K HDR, WDR time-lapsed truck driving videos!
No just that font tags are shitty when you aren't even using them for fonts. Using p or div or other type of container for just color would actually be the proper way. I prefer <text style="color:#??;">Sum Text</text> myself.
(Mar 3, 2013 09:27 AM)Irritiable Wrote:  You are saying that HTML should not be used across the internet anymore? ❓

Ironically, you seem to be the biggest supporter of people doing their own research and yet you can't even follow what you preach so often.

http://www.w3schools.com/tags/tag_font.asp

The font tag was deprecated in HTML 4.01 and is not used in HTML 5.

However much I hate w3schools, it is sometimes useful. http://w3fools.com
(Mar 3, 2013 11:29 AM)Han. Wrote:  Ironically, you seem to be the biggest supporter of people doing their own research and yet you can't even follow what you preach so often.

http://www.w3schools.com/tags/tag_font.asp

The font tag was deprecated in HTML 4.01 and is not used in HTML 5.

However much I hate w3schools, it is sometimes useful. http://w3fools.com

Pretty ironic coming from someone who thinks they're being clever, when they failed to do any research, thus reinstating my point all the more.
Is there any such thing as a woman of honor, and sincerity?

https://www.PutItOnMute.com/

4K HDR, WDR time-lapsed truck driving videos!
The font tag is obsolete. While it still works then it's highly encouraged to not be used.
(Mar 3, 2013 11:58 AM)Irritiable Wrote:  Pretty ironic coming from someone who thinks they're being clever, when they failed to do any research, thus reinstating my point all the more.

No, actually you're wrong. You shouldn't use the font tag. You shouldn't use inline styles either, but I'm guessing a userscript doesn't allow external resources (I've never used one.)

HTML4 has been around for well over a decade. ALL web browsers (both popular and unpopular) support ALL of it's features.
I do not care for non-standardized, non-widespread languages, that target a select few.

Can nobody research anything on their own these days? 🤦‍♂
Is there any such thing as a woman of honor, and sincerity?

https://www.PutItOnMute.com/

4K HDR, WDR time-lapsed truck driving videos!
(Mar 3, 2013 11:44 PM)Irritiable Wrote:  HTML4 has been around for well over a decade. ALL web browsers (both popular and unpopular) support ALL of it's features.
I do not care for non-standardized, non-widespread languages, that target a select few.

Can nobody research anything on their own these days? 🤦‍♂

You probably also support the usage of system in c++. 🤫
(Mar 4, 2013 12:14 AM)BaussHacker Wrote:  You probably also support the usage of system in c++. 🤫

Makes sense.

Compare a resource hog statement to a language transparency.

Informal fallacies are all that you have left? I am disappointed in you, BaussHacker.
Is there any such thing as a woman of honor, and sincerity?

https://www.PutItOnMute.com/

4K HDR, WDR time-lapsed truck driving videos!
(Mar 3, 2013 06:26 AM)Irritiable Wrote:  I was seriously thinking about creating that last night.

That is fucking creepy as hell to see that someone else did it. Hah!

Thanks, OP, for saving me the time. 🙂 I shall extensively use, and abuse this GS script now. :wink:

EDIT: Quick test on Firefox

Code
std::cout << "Horray OP!!!";

EDIT: Test... successful... Works like a charm. Thanks!!

Third edit: Hey. This is just for anyone who might actually use it (I am loving it so far.. I should've done it sooner, haha).
If you want the text colored, here's a simple fix to turn it black.
Code
newHTML = 'Code: <a href="javascript:void(0);" id="'+ id +'"><FONT COLOR="0066CC">[Select All]</FONT></a><br>';

Here's a link to a basic HTML color generator so you can generate whatever color you want to slap on it:
- http://www.w3schools.com/tags/ref_colorpicker.asp

Example of the modification

Looks awesome, I might add it with an option panel. Though I have to fix my other userscript first. Feel free to use it! 👍
FR1908


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Userscript] by mrnapolean1Apr 27, 2018 05:59 PM 4 222 Apr 27, 2018 05:59 PM
Last Post: mrnapolean1
[Opera] by PrivateDonutMar 15, 2018 02:32 AM 2 223 Mar 15, 2018 02:32 AM
Last Post: PrivateDonut
[Userscript] by BαkerOct 23, 2017 11:10 AM 5 376 Oct 23, 2017 11:10 AM
Last Post: Bαker