From 5352f0bb2f7b614f75df039d85901bc80cfd97f1 Mon Sep 17 00:00:00 2001 From: Dan Jones Date: Wed, 18 Oct 2017 06:58:46 -0500 Subject: [PATCH] =?UTF-8?q?Revert=20"=F0=9F=92=AA=20Support=20new=20layout?= =?UTF-8?q?"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 89d87c706b941803095a56da8e5e032c684b68ce. This reverts commit a8d5471e06931c8a4d981782619a4c9a979d1722. This reverts commit 171038b3a8ed6fdfa4089d9e54e26cd726ea125d. --- amaz.giveaway.user.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/amaz.giveaway.user.js b/amaz.giveaway.user.js index a3ec947..44c4642 100644 --- a/amaz.giveaway.user.js +++ b/amaz.giveaway.user.js @@ -4,7 +4,7 @@ // @description Allow removal of visited links on Amazon Giveaway Listing // @include https://smile.amazon.com/ga/giveaways* // @include https://www.amazon.com/ga/giveaways* -// @version 1.5.2 +// @version 1.4 // @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js // ==/UserScript== @@ -15,12 +15,12 @@ var getSmallUrl = function(fullUrl) { }; var hideOne = function(el) { - $(el).parents('.giveawayItemContainer').css('display', checked ? 'none' : 'block'); + $(el).parents('div.a-spacing-base').css('display', checked ? 'none' : 'block'); }; var hideVisited = function(evt) { checked = $(this).prop('checked'); - var $links = $('#giveaway-grid a[href*="amazon.com/ga"]'); + var $links = $('.landingPageSpacings a[href*="amazon.com/ga"]'); $links.each(function() { var href = getSmallUrl($(this).attr('href')); @@ -31,13 +31,13 @@ var hideVisited = function(evt) { }; $(document).ready(function() { - $('#giveaway-grid').on('click', 'a[href*="amazon.com/ga"]', function(evt) { + $('.landingPageSpacings').on('click', 'a[href*="amazon.com/ga"]', function(evt) { var href = getSmallUrl($(this).attr('href')); localStorage[href] = "visited"; hideOne(this); }); - $('#giveaway-result-info-bar-content').append(''); + $('h1:contains("Giveaways")').after(''); $('#hide_visited').on('click', hideVisited); });