NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name Imgur - Michael Cera warner
// @namespace pieterDB.be
// @version 0.1
// @description Warn people on imgur when a post can be a Michael Sera post
// @author pieterDB
// @match *imgur.com/gallery/*
// @grant none
// @downloadURL https://openuserjs.org/users/de.bie.pieter
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==
/* jshint -W097 */
'use strict';
var triggers = ['Michael','Cera'];
function highlight(userNameContainer) {
$(userNameContainer).css({
"background-color" : "red",
"color" : "white",
"padding": "4px",
"border-radius": "4px"
});
$('.post-image').css({
"background" : "none",
"background-color" : "darkred"
});
}
$(document).ready(function(){
var userNameContainer = $('.post-account');
var userName = $(userNameContainer).text();
$.each(triggers, function(index, value){
if(userName.indexOf(value) > -1) {
highlight(userNameContainer);
return false;
}
});
});