Guest User

Untitled

a guest
Jun 28th, 2015
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             var text = "";
  2.  
  3.             if (window.getSelection) {
  4.                 text = window.getSelection()
  5.                     .toString();
  6.  
  7.             } else if (document.selection && document.selection.type != "Control") {
  8.                 text = document.selection.createRange()
  9.                     .text;
  10.             }
  11.             text = text + '';
  12.  
  13.             if (!text) {
  14.                 selectednum = 0;
  15.                 lastselected = '';
  16.                 return;
  17.             }
  18.             lastselected = text;
  19.             selectednum = num;
  20.     //↓↓↓↓↓↓
  21.             lastselected = '>' + lastselected.split("\n")
  22.                 .join("\n>");
Advertisement
Add Comment
Please, Sign In to add comment