- // ==UserScript==
- // @name GameMiner.ru border
- // @namespace http://userstyles.org
- // @description Cria uma borda
- // @author MurkBRA
- // @include http://gameminer.ru/*
- // @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js
- // @require https://gist.github.com/raw/2625891/waitForKeyElements.js
- // @grant GM_addStyle
- // @version 0.1
- // ==/UserScript==
- startMain();
- function startMain() {
- var target = document.querySelector('.giveaways');
- var observer = new MutationObserver(function(mutations) {
- addEventListener();
- });
- var config = { childList: true,
- subtree: true};
- observer.observe(target, config);
- }
- //addEventListener();
- function addEventListener(){
- $('span.g-coal-icon').each(function(){
- if ($(this).html() == '1' | $(this).html() == '1 coal') {
- $(this).closest("div.giveaway.c-giveaway").css("border","4px solid yellow");
- }
- if($(this).html() == '0' | $(this).html() == '0 coal'){
- $(this).closest("div.giveaway.c-giveaway").css("border","4px solid red");
- }
- });
- }