Skip to content

Instantly share code, notes, and snippets.

@alaasalama
Last active August 21, 2016 02:37
Show Gist options
  • Save alaasalama/b8b68aa8a0cec685014f8595796d8934 to your computer and use it in GitHub Desktop.
Save alaasalama/b8b68aa8a0cec685014f8595796d8934 to your computer and use it in GitHub Desktop.
Auto insert the customer name in a bbPress reply
// ==UserScript==
// @name Hi-Automatic!
// @namespace http://alaasalama.com/
// @version 1.0
// @description Adding Hi+Name automatic for Themify support forums
// @author Alaa.Salama
// @include https://themify.me/forum/*
// @grant none
// @require https://code.jquery.com/jquery-2.2.4.min.js
// ==/UserScript==
(function() {
'use strict';
// Your code here...
var client_name = jQuery(".bbp-replies li:nth-child(3) a.bbp-author-name").text();
jQuery("body.single-topic #bbp_reply_content").append("Hi "+ client_name + "," + "\n");
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment