From 4d69b0243c4794752a553fdeacf87c01d07a45ee Mon Sep 17 00:00:00 2001 From: DylanBanta <32310773+DylanBanta@users.noreply.github.com> Date: Fri, 5 Jun 2020 03:48:38 -0400 Subject: [PATCH] Removed Announcement Div Removed the announcement div ".slides" if TOPBAR_TIMERS is true. This way if an announcement is visible it doesn't break Torn --- npc_profile_loot_timer.user.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/npc_profile_loot_timer.user.js b/npc_profile_loot_timer.user.js index cad195b..21d3d44 100644 --- a/npc_profile_loot_timer.user.js +++ b/npc_profile_loot_timer.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Torn: Loot timer on NPC profile // @namespace lugburz.show_timer_on_npc_profile -// @version 0.2.6 +// @version 0.2.7 // @description Add a countdown timer to desired loot level on the NPC profile page as well as on the sidebar and the topbar (optionally). // @author Lugburz // @match https://www.torn.com/* @@ -268,6 +268,12 @@ function addNpcTimers(data) { (function () { 'use strict'; + + //Removed the announcement's div but you could probably move it somewhere else if you wanted to still display the announcement. + if(TOPBAR_TIMERS){ + const slides = $(".slides"); + slides.remove(); + } // Your code here... if ($(location).attr('href').includes('profiles.php')) { @@ -284,4 +290,4 @@ function addNpcTimers(data) { function log(data) { if (LOGGING_ENABLED) console.log(data) -} \ No newline at end of file +}