Created
February 3, 2015 18:52
-
-
Save bmccormack/d3c721e9f4e22d025d33 to your computer and use it in GitHub Desktop.
Hide Not Good and Okay satisfaction ratings in Help Scout conversations.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Help Scout - Hide Negative Satisfaction Ratings | |
// @namespace https://secure.helpscout.net | |
// @include https://secure.helpscout.net/* | |
// @description Hides Not Good and Okay satisfaction ratings within conversations | |
// @author Ben McCormack | |
// @version 1.0.0.0 | |
// ==/UserScript== | |
// New method to inject javascript | |
var script = document.createElement("script"); | |
script.textContent = "(" + js.toString() + ")();"; | |
document.body.appendChild(script); | |
// Repeat the method to inject css | |
/*var style = document.createElement("style"); | |
style.setAttribute('type', 'text/css'); | |
style.textContent = css(); | |
document.body.appendChild(style); | |
*/ | |
function js() { | |
init(); | |
function init() { | |
doSomething(); | |
} | |
function doSomething() { | |
// Actual code to do the thing you want goes here | |
$('i.badge:contains("Not Good"), i.badge:contains("Okay")').hide() | |
} | |
} | |
function css() { | |
// Custom CSS goes here | |
return 'a {text-decoration: underline}'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment