forked from tastytea/userscripts
dlf_download_button: Fixed URL detection.
This commit is contained in:
parent
0b617420d1
commit
bfb5bb4b96
|
@ -2,7 +2,7 @@
|
||||||
// @name DLF download button
|
// @name DLF download button
|
||||||
// @description Adds a download button for each audio file on DLF sites.
|
// @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.
|
// @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
|
// @author tastytea
|
||||||
// @copyright 2019, tastytea (https://tastytea.de/)
|
// @copyright 2019, tastytea (https://tastytea.de/)
|
||||||
// @license GPL-3.0-only
|
// @license GPL-3.0-only
|
||||||
|
@ -47,13 +47,13 @@ function add_button(url)
|
||||||
button.appendChild(document.createTextNode("Download"));
|
button.appendChild(document.createTextNode("Download"));
|
||||||
|
|
||||||
// Change appearance based on site.
|
// 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.fontSize = "150%";
|
||||||
button.style.fontWeight = "bold";
|
button.style.fontWeight = "bold";
|
||||||
button.style.color = "black";
|
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");
|
button.setAttribute("class", "drk-articleplay");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue