Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var text = "";
- if (window.getSelection) {
- text = window.getSelection()
- .toString();
- } else if (document.selection && document.selection.type != "Control") {
- text = document.selection.createRange()
- .text;
- }
- text = text + '';
- if (!text) {
- selectednum = 0;
- lastselected = '';
- return;
- }
- lastselected = text;
- selectednum = num;
- //↓↓↓↓↓↓
- lastselected = '>' + lastselected.split("\n")
- .join("\n>");
Advertisement
Add Comment
Please, Sign In to add comment