Note that there are some explanatory texts on larger screens.

plurals
  1. POReplace all text that displaying in browser
    primarykey
    data
    text
    <p>I want to replace all displaying text with something like "@@@@". It mean user will see all the page is full of "@@@@" instead of texts (except image, iframe or something doesn't exists in the page's HTML code).</p> <p>This almost replace the html code of the page, but not effect to the tags and codes, just the text that display to user.</p> <p>For example, I want to replace all the text in this page:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;body&gt; &lt;ul class="topnav"&gt; &lt;li&gt;Item 1&lt;/li&gt; &lt;li&gt;Item 2 &lt;ul&gt;&lt;li&gt;Nested item 1&lt;/li&gt;&lt;li&gt;Nested item 2&lt;/li&gt;&lt;li&gt;Nested item 3&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt; &lt;li&gt;Item 3&lt;/li&gt; &lt;/ul&gt; &lt;div&gt;DIV1&lt;/div&gt; &lt;div&gt;DIV2&lt;/div&gt; &lt;span&gt;SPAN&lt;/span&gt; &lt;table&gt; &lt;tr&gt; &lt;td&gt;Username&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Password&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;p&gt; &lt;input type="checkbox" name="remember" tabindex=3 /&gt; &lt;label for="checkbox"&gt;Remember &lt;strong&gt;password&lt;/strong&gt;&lt;/label&gt; &lt;/p&gt; &lt;p&gt;Click here to &lt;a href='register.php'&gt;Register&lt;/a&gt;&lt;/p&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>And the result should be:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;body&gt; &lt;ul class="topnav"&gt; &lt;li&gt;@@@@&lt;/li&gt; &lt;li&gt;@@@@ &lt;ul&gt;&lt;li&gt;@@@@&lt;/li&gt;&lt;li&gt;@@@@&lt;/li&gt;&lt;li&gt;@@@@&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt; &lt;li&gt;@@@@&lt;/li&gt; &lt;/ul&gt; &lt;div&gt;@@@@&lt;/div&gt; &lt;div&gt;@@@@&lt;/div&gt; &lt;span&gt;@@@@&lt;/span&gt; &lt;table&gt; &lt;tr&gt; &lt;td&gt;@@@@&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;@@@@&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;p&gt; &lt;input type="checkbox" name="remember" tabindex=3 /&gt; &lt;label for="checkbox"&gt;@@@@&lt;strong&gt;@@@@&lt;/strong&gt;&lt;/label&gt; &lt;/p&gt; &lt;p&gt;@@@@&lt;a href='register.php'&gt;@@@@&lt;/a&gt;&lt;/p&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Some I've been tried:</p> <p>Use JQuery to replace all the elements, tags (and it's child) that only contain plain text, this works fine at the beginning:</p> <pre><code>&lt;ul class="topnav"&gt; &lt;li&gt;@@@@&lt;/li&gt; &lt;li&gt;@@@@ &lt;ul&gt;&lt;li&gt;@@@@&lt;/li&gt;&lt;li&gt;@@@@&lt;/li&gt;&lt;li&gt;@@@@&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt; &lt;li&gt;@@@@&lt;/li&gt; &lt;/ul&gt; &lt;div&gt;@@@@&lt;/div&gt; &lt;div&gt;@@@@&lt;/div&gt; &lt;span&gt;@@@@&lt;/span&gt; </code></pre> <p>But lately I realized that in case of elements, tags have child, it would failed:</p> <pre><code>&lt;p&gt; &lt;input type="checkbox" name="remember" tabindex=3 /&gt; &lt;label for="checkbox"&gt;Remember &lt;strong&gt;password&lt;/strong&gt;&lt;/label&gt; &lt;/p&gt; &lt;p&gt;Click here to &lt;a href='register.php'&gt;Register&lt;/a&gt;&lt;/p&gt; </code></pre> <p>So I tried another way, using document.body.innerText to select all the text, but the HTML format is lost.</p> <p>I was so tired. Can someone help me?</p> <p>Thanks a lot!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload