// ==UserScript== // @id GAF-QQRE // @name NeoGAF: Quick Quote, Reply, and Edit // @namespace hateradio))) // @author hateradio // @version 10.0.1 // @description This script adds the ability to quickly quote, reply, and edit posts on NeoGAF. Just click and go. // @homepage https://greasyfork.org/scripts/1022-neogaf-quick-quote-reply-and-edit // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpGRjg5NTBEMDYwODdFMDExQkE4RUNGOEQ3QzZENjU2MyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1NzUyNDZBRTg3RDkxMUUwQkE0Q0QyRjcyMEQwQUNDOCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1NzUyN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rudYq1p0hD8zXSwpQfm7+pGBemh+mkM11aOo+qH0bACoQz2MTXE0ciSwSF6kRIcSTP2YcYIjx1HEVO/eFkNgW6oElwBYAmD+ssbSf49f5cf/BBgAlKO7u4jI694AAAAASUVORK5CYII= // @screenshot https://raw.githubusercontent.com/hateradio/qqre/master/screenshot.png // @include http*://*neogaf.com/forum/showthread.php?* // @include http*://*neogaf.com/forum/newreply.php* // @include http*://*neogaf.com/forum/editpost.php* // @include http*://*neogaf.com/forum/newthread.php* // @include http*://*neogaf.com/forum/subscription.php* // @include http*://*neogaf.com/forum/showpost.php* // @include http*://*neogaf.com/forum/private.php* // @match *://*.neogaf.com/forum/showthread.php?* // @match *://*.neogaf.com/forum/newreply.php* // @match *://*.neogaf.com/forum/editpost.php* // @match *://*.neogaf.com/forum/newthread.php* // @match *://*.neogaf.com/forum/subscription.php* // @match *://*.neogaf.com/forum/showpost.php* // @match *://*.neogaf.com/forum/private.php* // @grant GM_log // @updated 06 JUL 2017 // @since 30 OCT 2010 // (c) 2010+, hateradio // @downloadURL none // ==/UserScript== /* ## 10.0.1 * **Fix**: Search input now matches the style of the site * **Fix**: Quick Editor now toggling correctly ## 10 * **New**: Emoji toolbar to toggle which emoji to display * **New**: Adds the `[NOPARSE]` tag -- won't parse any BBCode within it * **Fix**: Posts without user names won't stop the script execution Changes ## 9.0.2 * **FIX**: HTTPS for NeoGAF ## 9.0.1 * **FIX**: Saved text would appear in the title field instead of the textarea. ## 9.0 * **New**: Keyboard toggle for images in quotes is now ALT+SHIFT+T instead of ALT+T for greater compatibility. * **New**: Improved shortcuts for Mac (eg, CMD+B for Bold) * **New**: Temporary storage saves text as it is written. * **New**: Subscription setting overhauled. * - Will now only provide an override option, as all posts made will default to the settings provided by the [User Control Panel](http://www.neogaf.com/forum/profile.php?do=editoptions#sel_autosubscribe) * **New**: Middle clicking on Emoji will link to [CodePoints.net](https://codepoints.net) for information about that character * **New**: AutoPager & Live Update extension support * **New**: Informs anonymous users to sign in before submitting posts * **New**: Resize toggle added to Emoji box * **New**: Tabbing will send the focus from the textarea to the Submit button * **New**: Routing mechanism to load the different code on the different pages * **New**: New Form class to create Quick Reply and Edit forms * **New**: Character escaping mechanism to convert JavaScript characters to HTML entities for AJAX transmissions; removes VB method * **Fix**: Removed vertical alignment of inputs * **Fix**: Posts that have been saved now clear after the post has been processed * Renames "Delete" button with "Clear" * Restructure of the code base // todo implement preview ## 8.0 * **New**: Emoji picker! * **New**: (Windows) Emoji support to Chrome-based browsers! * - _Note 1_: Segoe UI Symbol, Segoe UI Emoji and Symbola added to the font list * - _Note 2_: This may change default fonts a bit * - _Note 3_: Windows 7 users who have issues displaying Emoji should install [Symbola](http://users.teilar.gr/~g1951d/) * **New**: USC-2 decoder and entity encoder to work with forum AJAX to transmit Emoji data * **Fix**: Removing recursive quotes no longer causes an error 7.4.1
' : '[indent]', '[^]+?([^]+?)<\\/pre>[^]+?<\\/blockquote>' : '[code]$1[/code]', '<\\/blockquote>' : '[/indent]', '' : '[*]', '<\\/li>' : '', '' : '[b]', '<\\/b>' : '[/b]', '' : '[i]', '<\\/i>' : '[/i]', ' ' : '[strike]', '<\\/strike>' : '[/strike]', '' : '[u]', '<\\/u>' : '[/u]', '' : '[list]', '<\\/ul>' : '[/list]\n', '
' : '[list=1]', '<\\/ol>' : '[/list]\n', '
' : '', '
' : '[img]$1[/img]', '([^]+?)<\\/a>' : '[email="$1"]$2[/email]', '' : '[url="$1"]', '' : '[/url]', '([^]+?)<\\/span>' : '$1', '([^]+?)<\\/span>' : '[spoiler]$1[/spoiler]', '([^]+?)<\\/span>' : '[spoiler]$1[/spoiler]', '([^]+?)<\\/span>' : '[highlight]$1[/highlight]', '
' : '', '' : '', ' ' : '', '<.*?>' : '', '\\[I\'m an idiot\\.\\]' : 'lol' }, buttons: ['removeformat', 'space', 'undo', 'redo', 'space', 'bold', 'italic', 'underline', 'space', 'insertorderedlist', 'insertunorderedlist', 'outdent', 'indent', 'space', 'createlink', 'unlink', 'email', 'insertimage', 'space', 'quote', 'code', 'space', 'resize'], quote: { $replaceImgWithUrlP1: function (text) { return text.replace(/\[img\]/i, 'Link[/url] : [url="'); }, replaceImgWithUrl: function (text) { return text.replace(/\[url\=\".+?\"\]\[img\]/ig, Form.shared.quote.$replaceImgWithUrlP1) .replace(/\[\/img\]\[\/url/ig, '"]Image[/url') .replace(/(?:\[(\/?)img\])/ig, '[$1url]'); }, add: function (post) { if (Form.userStorage.u) { post = Form.shared.quote.replaceImgWithUrl(post); } app.state.activeBox.value += app.state.activeBox.value ? ('\n\n' + post) : post; if (app.state.activeBox.id === app.state.form.elements.message.id) { Form.events.saveStorage(); } }, unquote: function (post) { var div = $.e('div', {innerHTML: post}), e = div.querySelectorAll('.quote:not(.code)'), i = e.length; while (i--) { try { div.removeChild(e[i]); } catch (er) {} } return div.innerHTML; } }, loadIds: function () { try { Form.threadId = +document.querySelector('.left a[href*="showthread.php?t="]').href.match(/t\=(\d+)/)[1]; Form.postId = +document.querySelector('a[href^="newreply.php?do=newreply&noquote=1&p="]').href.match(/p\=(\d+)/)[1]; } catch (e) {} return (Form.threadId && Form.postId); }, tokenFromPage: function () { try { return document.getElementsByTagName('head')[0].textContent.match(/SECURITYTOKEN = "(.+?)"/)[1]; } catch (e) { /*alert('Quick Quote, Reply and Edit encountered an error.'); */ return ''; } }, loadScript: function () { var s = $.e('script', {type: 'text/javascript', src: '/forum/clientscript/vbulletin_textedit.js' + Form.shared.scriptVersion}); s.addEventListener('load', function () { embedScript(function () { window.$vb_hook = function (id) { window.vB_Editor['vB_Editor_' + id] = new window.vB_Text_Editor('vB_Editor_' + id, 0, 3, 1); }; var vbphrase = window.vbphrase || []; vbphrase.enter_list_item = 'Enter a list item.'; vbphrase.message_too_short = 'Your message is too short.'; vbphrase.enter_link_url = 'URL:'; vbphrase.enter_image_url = 'Image URL:'; vbphrase.enter_email_link = 'E-mail:'; window.vbphrase = vbphrase; window.$vb_hook('001'); }); }, false); document.body.appendChild(s); } }; Form.events = { clickDelegate: function (e) { if (e.target && e.target.title === 'Quick Quote') { Form.events.quickQuote(e); } if (e.target && e.target.title === 'Quick Editor++') { Editor.events.quickEdit(e); } }, quickQuote: function (e) { // if (e.target && e.target.title === 'Quick Quote') { e = e.target; var user = e.getAttribute('data-user'), pid = e.getAttribute('data-post-id'), id = e.getAttribute('data-id'), i, re, post = Form.shared.quote.unquote(document.getElementById(pid).innerHTML); for (i in Form.shared.reg) { if (Form.shared.reg.hasOwnProperty(i)) { re = new RegExp(i, 'ig'); post = post.replace(re, Form.shared.reg[i]); } } post = '[quote=' + user + ';' + id + ']' + $.h(post) + '[/quote]\n'; e.className = 'multiquotelink quickquotes quickquoted'; Form.shared.quote.add(post); // } }, submit: function (e) { if (Form.shared.elements.logged) { strg.save(Form.POST_KEY, {threadId: Form.threadId}); } else { e.preventDefault(); document.location.hash = '#'; alert('Please login!'); document.location.hash = '#top'; Form.events.saveStorage(); } }, toggleImageQuotes: function (e) { var k = String.fromCharCode(e.which).toLowerCase(); if (e.altKey && e.shiftKey && (k === 't' || k === '\u02C7')) { e.preventDefault(); Extra.click(app.state.form.elements.convert); alert('Notice: Converting IMG to URL ' + (app.state.form.elements.convert.checked ? 'enabled.' : 'disabled.')); } }, saveStorage: function () { app.model.saveStorage(); }, clear: function () { if (this.value === 'Clear') { app.state.form.elements.title.value = app.state.form.elements.message.value = ''; app.state.form.elements.message.focus(); } app.model.clearStorage(); }, textStore: function (e) { sessionStorage.setItem('qqre-temp', JSON.stringify({ id: Form.threadId, title: app.state.form.elements.title.value, text: e.target.value, z: +(new Date()) })); } }; Form.token = function () { var s = greaseWindow.SECURITYTOKEN; return typeof s === 'string' ? s : ''; }; Form.canAdd = function () { return Form.shared.elements.main && Form.shared.loadIds(); }; Form.removePreviousPost = function () { if (Form.hasJustPosted()) { // console.log('I think you have just posted, so I will clear previous post . . .'); app.model.clearStorage(); } }; Form.hasJustPosted = function () { var id, tid = +strg.grab(Form.POST_KEY).threadId, hash = document.location.hash.substr(1), last = (function (posts) { return posts.length > 0 ? posts[posts.length - 1] : null; }(document.querySelectorAll('.mypost'))); console.log('just posted?'); if (tid === Form.threadId && last) { id = last.id; console.log(id, hash, tid); if (/(?:posted=1)/.test(document.location.href) && id === hash) { console.log('just posted : 1'); return true; } if (/(?:post(\d+))/.test(document.location.hash) && id === hash) { console.log('just posted : 2'); return true; } } return false; }; Form.prototype = { constructor: Form, lastTabIndex: function () { var tabs = document.querySelectorAll('[tabindex]'), i, tabIndex = 0; for (i = 0; i < tabs.length; i++) { if (tabs[i].tabIndex > tabIndex) { tabIndex = tabs[i].tabIndex; } } return tabIndex; }, make: function () { var f = $.e('form', {className: 'quickreplyformp', action: this.id === '001' ? 'newreply.php?post=1' : 'editpost.php', name: 'vbform', method: 'post', onsubmit: 'return vB_Editor["vB_Editor_' + this.id + '"].prepare_submit(0, 1)'}, this.el), d = $.e('div', {className: this.id === '001' ? 'alt1 newreplybox' : 'alt2 newreplybox'}, f), p = $.e('p', null, d), editor = $.e('div', {id: 'vB_Editor_' + this.id, className: 'vBulletin_editor'}, d), container = $.e('div', {innerHTML: ''}, d), r = $.e('div', {className: 'quickreplyform_hotspot'}, d), index = this.lastTabIndex() + 1; this.elements.buttons = $.e('div', {className: 'quickreplyform_buttons'}, r); this.elements.message = $.e('textarea', {dir: 'ltr', tabIndex: index, cols: 60, rows: 10, _width: '98%', _height: '150px', id: 'vB_Editor_' + this.id + '_textarea', name: 'message', value: this.message}); this.elements.control = $.e('div', {id: 'vB_Editor_' + this.id + '_controls', className: 'control'}, editor); container.querySelector('.text_emo_container_text').appendChild(this.elements.message); emoji.make(container.querySelector('.text_emo_container_emo'), this.elements.message); if (this.edit) { this.elements.reason = $.e('input', {className: 'biginput', type: 'text', title: 'Optional', maxlength: 125, size: 50, name: 'reason', value: this.reason}, p); $.e('small', {title: 'Reason for editing.', _cursor: 'help', textContent: ' Reason'}, p); } else { this.elements.title = $.e('input', {size: 50, name: 'title', className: 'biginput', type: 'text', value: this.title}, p); $.e('small', {title: 'Optionally, set a title for your post.', _cursor: 'help', textContent: ' Title'}, p); } $.e('input', {type: 'hidden', name: 'securitytoken', id: '', value: Form.token()}, r); $.e('input', {type: 'hidden', name: 'wysiwyg', id: '', value: 0}, r); $.e('input', {type: 'hidden', name: 's', value: ''}, r); $.e('input', {type: 'hidden', name: 'do', value: this.id === '001' ? 'postreply' : 'updatepost'}, r); $.e('input', {type: 'hidden', name: 't', value: Form.threadId}, r); $.e('input', {type: 'hidden', name: 'p', value: this.id === '001' ? Form.postId : this.id}, r); $.e('input', {type: 'hidden', name: 'posthash', value: ''}, r); $.e('input', {type: 'hidden', name: 'poststarttime', value: ''}, r); $.e('input', {type: 'hidden', name: 'parseurl', value: 1}, r); this.elements.submit = $.e('input', {type: 'submit', name: 'sbutton', value: 'Submit', id: 'vB_Editor_' + this.id + '_save', className: 'large-button submit', tabIndex: index, accesskey: 's', title: 'Submit your reply.'}, this.elements.buttons); if (this.edit) { this.elements.cancel = $.e('input', {type: 'button', name: 'cancel', value: 'Cancel', className: 'large-button submit cancel_button', tabIndex: index, accesskey: 'c', title: 'Cancel your reply.'}, this.elements.buttons); } this.elements.preview = $.e('input', {type: 'submit', name: 'preview', value: 'Preview', className: 'large-button submit', tabIndex: index, accesskey: 'p', title: 'Preview your reply.'}, this.elements.buttons); $.e('div', {innerHTML: 'View ' + (Extra.mac ? '⌘' : 'CTRL') + ' Shortcuts
'}, r); this.addButtons(); this.elements.body = f; this.elements.hotspot = r; }, makePrimary: function () { this.elements.body.id = Form.PRIMARY; this.elements.save = $.e('input', {type: 'button', name: 'sbutton1', value: 'Save', id: 'quicksavebutton', className: 'large-button submit', tabIndex: this.elements.submit.tabIndex, title: 'Save your reply.', $action: 'save'}); this.elements.buttons.insertBefore(this.elements.save, this.elements.submit.nextSibling); this.elements.clear = $.e('input', {type: 'button', name: 'sbutton2', value: 'Clear', id: 'quickclearbutton', className: 'large-button submit', tabIndex: this.elements.preview.tabIndex, title: 'Clear text.'}, this.elements.buttons); this.elements.temp = this.elements.message; this.elements.subscribe = $.e('div', {innerHTML: '