|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Majikn
Super Robot
Posts: 2357
|
|
« Reply #20 on: 5 November 2023, 09:28:03 » |
|
Here's my attempt at a fix for the spoiler button. Not really the best thing ever but it's just javascript that converts your text into BBCode that will remain unreadable on any post unless it's highlighted. Thought it would work as a temporary solution that would still function with the existing layout of the forum.Here's the code that can be saved into a .html file and opened, it creates a userform that converts your text into the above BBCode monstrosity. edit: Just in case this probably wasn't clear, this code can be copied into notepad, saved as .html, opened, and then used to generate the bbcode on each of your PCs. <script language="JavaScript"> <!-- function spoilerText(str) { document.write( '[quote author=SPOILER (highlight to read)][/quote]'); for (var i = 0; i < str.length+1; i+=2) { document.write( '[color=#0000FF]' + str.substr(i,1) + '[/color]'); document.write( '[color=#0080FF]' + str.substr(i+1,1) + '[/color]'); } document.write( '<br><br>[quote author=END OF SPOILER][/quote]' ); }
// --> </script> <form method="get"> <textarea rows="20" cols="50" id="usrform" style="font-family:Century Gothic;"> Inserttexthere </textarea> <br> <input type="button" value="Submit" onClick="pr()"> </form> <span id="result" style="font-family:Century Gothic;"></span>
<script language="JavaScript"> function pr() { document.getElementById("result").innerHTML = document.getElementById('usrform').value; spoilerText(document.getElementById("result").innerHTML,0); } </script>
|
|
« Last Edit: 5 November 2023, 15:09:57 by Majikn »
|
Logged
|
The Exorcist has taught me that when I'm losing an argument I may save face by vomiting on the opposition.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|