Skip to content

Instantly share code, notes, and snippets.

@Der-Eddy
Last active September 14, 2016 18:16
Show Gist options
  • Save Der-Eddy/1083108e9403697d8d6627f9be668b07 to your computer and use it in GitHub Desktop.
Save Der-Eddy/1083108e9403697d8d6627f9be668b07 to your computer and use it in GitHub Desktop.
Greasemonkey Userscript
// ==UserScript==
// @name Post Template
// @namespace Elitepvpers
// @include *//www.elitepvpers.com/forum/*
// @version 1.1
// @author Der-Eddy
// @grant none
// ==/UserScript==
(function($){
// '\n' steht für eine Leerzeile
// {USER} wird durch einen Benutzernamen ersetzt
var msg = '\n' +
'\n' +
'\n' +
'Mit freundlichen Grüßen \n' +
'{USER}';
//ES6 :(
// -----------------------------------------------------------------------------
// YOU SHOULD NOT CHANGE ANYTHING BELOW THIS UNLESS YOU KNOW WHAT YOU ARE DOING!
// -----------------------------------------------------------------------------
var usernick = $('ul#userbaritems').find('a').html();
msg = msg.replace('{USER}', usernick);
var quickReply = $('textarea#vB_Editor_QR_textarea');
var advancedReply = $('textarea#vB_Editor_001_textarea');
if (quickReply.length == 1){
quickReply.val(quickReply.val() + msg);
} else if (advancedReply.length == 1){
advancedReply.val(advancedReply.val() + msg);
}
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment