Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('.post')
- .live('mouseup', function(e) {
- 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>");
- })
- $('.postbtn-reply-href')
- .live('click', function() {
- var num = $(this)
- .attr('name');
- //↓↓↓↓↓↓
- var str = '>>' + num + '\n';
- if (selectednum == num) {
- //↓↓↓↓↓↓
- str += lastselected + '\n';
- selectednum = 0;
- }
- if (Store.get('old.append_postform', false)) {
- if (appendPostForm(num)) insert(str);
- } else {
- insert(str);
- }
- return false;
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment