Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4336518
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:49:04+00:00 2026-05-21T10:49:04+00:00

I have a little website where I would like to obfuscate some text to

  • 0

I have a little website where I would like to obfuscate some text to protected spoiling of users that accidentally read it untimely.

Much like the keywords on imdb were, where you have to rollover to reveal them.

I thought it would be a nice and interactive way to reveal the text if its marked.

Example:

How does a programmer express
h(is)|(er) love? Zl srryvatf sbe lbh
ner uneqpbqrq.

Now you would drag mark the obfuscated text much like you would get ready to copy it to your clipboard, and it should reveal.

Is there a way to do this? My current problem is a way to determine the current selection in javascript.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T10:49:05+00:00Added an answer on May 21, 2026 at 10:49 am

    There is one tricky way I can think of with only CSS:

    Use the same color text as the background color! Then when users highlight, the text is revealed. You would need to outline or draw attention to the part that they need to highlight to make it obvious.

    Another way:

    Stuff the rot13 into a readonly text input, and attach a select event with an AJAX call that decodes it. Will only work for smaller bits of spoiler text that fit in the input. You could try this with a textarea but it doesn’t accept the readonly attribute (maybe doesn’t matter).

    There are many many other ways to do this (hide/show divs for example), but these are the closest/simplest ways I could think that match your requirement of selecting text to trigger the spoiler.

    EDIT: With the background color solution, you would not want to encode the text, just make it “invisible” until it’s highlighted. It’s actually a pretty cheesy solution, and there are many others that are better, but the good part is that it is css only. Honestly I think forcing a complete highlight will be a pain for your users, just store the rot13 value in one place, the real value in another (hidden span maybe), and use js to swap them out on click or something. No need to actually process the decoding separately. You could probably do this with CSS alone and some smart :hover or :focus selectors.

    EDIT2: For some reason it didn’t occur to me that you can do rot13 decoding with javascript alone, I’m coming from the php world so now I feel pretty foolish. Sorry I didn’t answer your question better, but hopefully some of this is useful. GL!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a website with a database of users and I would like to
I have articles on my website which I would like to get corrected and
I am doing little work for my website and I would like to auto-resize
I have a website and I would like to implement a paid subscription service.
I have a very simple website, and would like to create a 'Comments' section
I would like to have it so that when I play one Vimeo video
Our website code is written in PHP. We have very little testing in regards
I've been stuck on a little unix command line problem. I have a website
I have little unusual problem to solve. I need some hint or links to
I have little doubt about string reading in C. string reading functions like gets,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.