NATION

PASSWORD

Does JavaScript have to be used for spoilers?

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.
User avatar
Cekoviu
Postmaster-General
 
Posts: 13028
Founded: Oct 18, 2017
Civil Rights Lovefest

Does JavaScript have to be used for spoilers?

Postby Cekoviu » Fri Feb 14, 2020 10:28 am

I use NoScript to speed up websites on an old computer I have, but it makes it impossible to view the content of any spoiler here. Is that something tightly integrated into phpBB or can that be fixed somehow?
I suffer from reverse Benjamin Button syndrome, please be sensitive when discussing time around me.
she/her
"Child labor laws are ruining this country." --Ron Swanson
Torrocca wrote:"Your honor, it was not mein fault! I didn't order the systematic genocide of millions of people, it was the twenty kilograms of pure-cut Bavarian cocaine that did it!"
Liriena wrote:anyone to the left of Pinochet: *exists*

right-wingers: wat about vuvuzelaaa lmao gottem

User avatar
Trotterdam
Powerbroker
 
Posts: 8204
Founded: Jan 12, 2012
Left-Leaning College State

Postby Trotterdam » Sat Feb 15, 2020 12:51 am

Which browser? On mine, I can right-click and select "Inspect Element", then remove the "display:none" CSS manually.

There are ways to make spoiler boxes work with just CSS alone, such as:
Code: Select all
<style type="text/css">
div.spoiler { display:none !important }
input.spoilercheck:checked + div.spoiler { display:block !important }
</style>
<input type="checkbox" class="spoilercheck">Show spoiler
<div class="spoiler">bla bla bla</div>
or:
Code: Select all
<style type="text/css">
div.spoiler { display:none !important }
input.spoilerpreface:focus + div.spoiler { display:block !important }
</style>
<input type="text" readonly class="spoilerpreface" value="Click to show">
<div class="spoiler">bla bla bla</div>
Although really old browsers still have trouble with these.

The really old-fashioned way to do spoilers is to just set the foreground and background colors to the same value, so that the text is only visible by selecting it, which which NationStates already allows you to do (or you can even make it transparent), but just isn't popular in the community because more dedicated spoiler tags exist.

User avatar
Cekoviu
Postmaster-General
 
Posts: 13028
Founded: Oct 18, 2017
Civil Rights Lovefest

Postby Cekoviu » Sat Feb 15, 2020 3:44 am

Trotterdam wrote:Which browser? On mine, I can right-click and select "Inspect Element", then remove the "display:none" CSS manually.

There are ways to make spoiler boxes work with just CSS alone, such as:
Code: Select all
<style type="text/css">
div.spoiler { display:none !important }
input.spoilercheck:checked + div.spoiler { display:block !important }
</style>
<input type="checkbox" class="spoilercheck">Show spoiler
<div class="spoiler">bla bla bla</div>
or:
Code: Select all
<style type="text/css">
div.spoiler { display:none !important }
input.spoilerpreface:focus + div.spoiler { display:block !important }
</style>
<input type="text" readonly class="spoilerpreface" value="Click to show">
<div class="spoiler">bla bla bla</div>
Although really old browsers still have trouble with these.

The really old-fashioned way to do spoilers is to just set the foreground and background colors to the same value, so that the text is only visible by selecting it, which which NationStates already allows you to do (or you can even make it transparent), but just isn't popular in the community because more dedicated spoiler tags exist.

Pale Moon. Can't test this solution right now because the computer is at work, but I'll try on Monday.
I suffer from reverse Benjamin Button syndrome, please be sensitive when discussing time around me.
she/her
"Child labor laws are ruining this country." --Ron Swanson
Torrocca wrote:"Your honor, it was not mein fault! I didn't order the systematic genocide of millions of people, it was the twenty kilograms of pure-cut Bavarian cocaine that did it!"
Liriena wrote:anyone to the left of Pinochet: *exists*

right-wingers: wat about vuvuzelaaa lmao gottem


Return to Technical

Who is online

Users browsing this forum: Austriala, SherpDaWerp

Advertisement

Remove ads