Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1.  
  2.  
  3. var smartQuoteBackgroundColor = "#adb1a1"; // (Default: #adb1a1)
  4. var smartQuoteTextColor = "#111111"; // (Default: #111111)
  5. // Quote Header Colors (Header of Quote Block)
  6. var smartQuoteHeaderTextColor = "#000000"; // (Default: #000000)
  7. var smartQuoteHeaderBackgroundColor = "#b1d8bf"; // (Default: #b1d8bf)
  8. // Notification Text - Username Quoted (Mention text at top of page)
  9. var showsmartQuoteNotification = true; // (Default: true)
  10. var smartQuoteNotificationColor = "#bbb"; // (Default: #FF3B30)
  11. var smartQuoteNotificationColorMentioned = "#ff0000"; // (Default: #FF3B30)
  12. // Quote Header Colors - Username Quoted
  13. var smartQuoteHeaderMatchBackgroundColor = "#bc3232"; // (Default: #bc3232)
  14. var smartQuoteHeaderMatchTextColor = "#000000"; // (Default: #000000)
  15. // Debug
  16. var debug = false;
  17. // ------------------------------ ON PAGE LOAD ------------------------------
  18. var username = $("#panel strong a:eq(0)").text();
  19. var usernameCount = 0;
  20. // Blockquotes
  21. if (debug){console.log("Number of Quotes: "+$("*").find("blockquote").length);}
  22. if ($("*").find("blockquote").length > 0){
  23. // Each Block Quote Header
  24. $("*").find("blockquote cite").each(function() {
  25.  
  26. // Username Quoted
  27. if ($(this).text().includes(username)){
  28. usernameCount++;
  29. if (debug){console.log("Username found.");}
  30. $(this)
  31. .parent().css("border", '3px groove #633453');
  32. }
  33. });
  34. }
  35. if (showsmartQuoteNotification){
  36. if (usernameCount < 1)
  37. $(".quick_keys .float_left:eq(0)").append($("<strong>").text("No Mentions Found").css("color",smartQuoteNotificationColor));
  38. else
  39. $(".quick_keys .float_left:eq(0)").append($("<strong>").text("("+usernameCount+") Mentions").css("color",smartQuoteNotificationColorMentioned));
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement