Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Put a semicolon after all statements. JavaScript does it automatically for you when you "forget" one at the end of a line**, but since you used a tool to make everything fit on one line, this doesn't happen anymore.</p> <p>** it should also be happening when a statement is followed by a <code>}</code>, but it's just bad practice to rely on it. I would always write all semicolons myself.</p> <p>Actually, you know what, since it's so easy, I did it for you:</p> <pre><code>function getSelected() { var selText; var iframeWindow = window; if (iframeWindow.getSelection) { selText = iframeWindow.getSelection() + ""; } else if (iframeWindow.document.selection) { selText = iframeWindow.document.selection.createRange().text; } selText = $.trim(selText); if (selText != "") { return selText; } else { return null; } } $(document).ready(function () { function scan_selectedText() { if (getSelected() == null) { return false; } if (getSelected().length &lt; 25) { return false; } $(document)[0].oncontextmenu = function () { return false; }; var result = true; var selected_Text = getSelected(); selected_Text = selected_Text.replace(/ {2,}/g, ' ').replace(/\s{2,}/g, ' '); $('#content .para').each(function () { var accepted_text = $.trim($(this).text()); accepted_text = accepted_text.replace(/ {2,}/g, ' ').replace(/\s{2,}/g, ' '); if (accepted_text.search(selected_Text) &gt; -1) { result = false; } }); var AllAccepted = ""; $('#content .para').each(function () { var correntDiv = $.trim($(this).text()).replace(/ {2,}/g, ' ').replace(/\s{2,}/g, ' '); AllAccepted = AllAccepted + correntDiv + " "; }); if ($.trim(AllAccepted).search(selected_Text) &gt; -1) { return false; } if (!result) { return false; } var body = $.trim($('body').text()); body = body.replace(/ {2,}/g, ' ').replace(/\s{2,}/g, ' '); var bodyWithoutDivs = body; $('#content').each(function () { var correntDiv = new RegExp($.trim($(this).text()).replace(/ {2,}/g, ' ').replace(/\s{2,}/g, ' '), ""); bodyWithoutDivs = bodyWithoutDivs.replace(correntDiv, ''); }); if (bodyWithoutDivs.search(selected_Text) &gt; -1) { return false; } if (body == selected_Text) { return true; } return true; } $(document).mousedown(function (key) { if (key.button == 2) { if (scan_selectedText() == true) { $(document)[0].oncontextmenu = function () { return false; }; } else { $(document)[0].oncontextmenu = function () { return true; }; } } }); var isCtrl = false; $(document).keyup(function (e) { if (e.which == 17) isCtrl = false; }).keydown(function (e) { if (e.which == 17) isCtrl = true; if (e.which == 67 &amp;&amp; isCtrl == true) { $("#content2").animate({ opacity: 0 }, 500).animate({ opacity: 1 }, 500); if (scan_selectedText() == true) { return false; } else { return true; } } }); document.onkeypress = function (evt) { if (evt.ctrlKey == true &amp;&amp; evt.keyCode == 67) { $("#content2").animate({ opacity: 0 }, 500).animate({ opacity: 1 }, 500); if (scan_selectedText() == true) { return false; } else { return true; } } }; $('*').bind('copy', function (key) { if (scan_selectedText() == true) { return false; } else { return true; } }); }); </code></pre>
    singulars
    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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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