From bfb5bb4b967bd68733fca2e20a086362cad5a293 Mon Sep 17 00:00:00 2001 From: tastytea Date: Thu, 11 Jul 2019 18:15:07 +0200 Subject: [PATCH] dlf_download_button: Fixed URL detection. --- audio/dlf_download_button.user.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/audio/dlf_download_button.user.js b/audio/dlf_download_button.user.js index bd36d93..b6f488e 100644 --- a/audio/dlf_download_button.user.js +++ b/audio/dlf_download_button.user.js @@ -2,7 +2,7 @@ // @name DLF download button // @description Adds a download button for each audio file on DLF sites. // @description:de Fügt einen download-button für jede audio-datei auf DLF-seiten hinzu. -// @version 2019.07.04.1 +// @version 2019.07.11.1 // @author tastytea // @copyright 2019, tastytea (https://tastytea.de/) // @license GPL-3.0-only @@ -47,13 +47,13 @@ function add_button(url) button.appendChild(document.createTextNode("Download")); // Change appearance based on site. - if (window.location.href.search("deutschlandradio.de")) + if (window.location.href.search("deutschlandradio.de") > 0) { button.style.fontSize = "150%"; button.style.fontWeight = "bold"; button.style.color = "black"; } - else if (window.location.href.search("deutschlandfunkkultur.de")) + else if (window.location.href.search("deutschlandfunkkultur.de") > 0) { button.setAttribute("class", "drk-articleplay"); }