Skip to content

Instantly share code, notes, and snippets.

@jdelamater99
Last active April 8, 2019 19:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdelamater99/62ee1285912744045213eaeb6f8a99c4 to your computer and use it in GitHub Desktop.
Save jdelamater99/62ee1285912744045213eaeb6f8a99c4 to your computer and use it in GitHub Desktop.
Make Kinja Deals promotions stand out more
// ==UserScript==
// @name Kinja Deals Caption Recolor
// @namespace http://jdel.us
// @description The default image caption color blended in too much. This changes the color for the captions on Deals.Kinja to a dark green.
// @include https://gizmodo.com/*
// @include https://jalopnik.com/*
// @include https://kotaku.com/*
// @include https://deadspin.com/*
// @include https://jezebel.com/*
// @include https://theroot.com/*
// @include https://avclub.com/*
// @include https://earther.com/*
// @include https://lifehacker.com/*
// @include https://splinternews.com/*
// @include https://thetakeout.com/*
// @include https://theonion.com/*
// @include https://kinja.com/*
// @include https://theinventory.com/*
// @include https://*.gizmodo.com/*
// @include https://*.jalopnik.com/*
// @include https://*.kotaku.com/*
// @include https://*.deadspin.com/*
// @include https://*.jezebel.com/*
// @include https://*.theroot.com/*
// @include https://*.avclub.com/*
// @include https://*.earther.com/*
// @include https://*.lifehacker.com/*
// @include https://*.splinternews.com/*
// @include https://*.thetakeout.com/*
// @include https://*.theonion.com/*
// @include https://*.kinja.com/*
// @include https://*.theinventory.com/*
// @version 0.4
// @grant none
// ==/UserScript==
var captions = document.getElementsByTagName("figcaption");
var promoCodes = document.getElementsByClassName("commerce-inset__promocode");
var anchors = Array();
for (var i=0; i<captions.length; i++) {
anchors = captions[i].getElementsByTagName("a");
for (var j=0; j<anchors.length; j++){
anchors[j].style.color = "#bef";
}
//captions[i].style.color = "#619c64";
captions[i].style.color = "#ffffff";
captions[i].style.backgroundColor = "#619c64";
captions[i].style.fontWeight = "bold";
captions[i].style.paddingLeft = "5px";
captions[i].style.paddingRight = "5px";
}
for (var i=0; i<promoCodes.length; i++) {
promoCodes[i].style.color = "#ffffff";
promoCodes[i].style.backgroundColor = "#619c64";
promoCodes[i].style.fontWeight = "bold";
promoCodes[i].style.paddingLeft = "5px";
promoCodes[i].style.paddingRight = "5px";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment