Is it possible to disable Ctrl + F of find in page?

后端 未结 9 1340
夕颜
夕颜 2020-12-01 12:39

I have a puzzle site and its an awful way of cheating. Its okay if only partially, but can it be done?
Something I had in mind was replacing the letters with images, but

9条回答
  •  抹茶落季
    2020-12-01 13:17

    I don't think there's a way to disable the feature altogether and there should not be a way to disable it.

    However you can ensure that some text will not be found by Ctrl+F by writing it in away that the browser doesn't consider continous text.

    Using images is one approach that's relatively simply.

    Alternatively you can randomize the letters and re-arrange them with some CSS magic (my CSS-fu is too weak to give an example, unfortunately). For example if you want to "hide" the word "hello", then write out "lehol" with each letter in a separate

    and apply some CSS styles so that visually the letters will be in the correct order.

    Note that this (and probably all other working solutions as well) will also break copy-and-paste of the text.

提交回复
热议问题