From 5602b4a7e30a02f3225e3e373eb13553a0298b2e Mon Sep 17 00:00:00 2001 From: tastytea Date: Tue, 18 Jun 2019 21:01:07 +0200 Subject: [PATCH] arte_download_button: Renamed functions and variables names. They are more descriptive now. --- video/arte_download_button.user.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/video/arte_download_button.user.js b/video/arte_download_button.user.js index b0877d8..078eb72 100644 --- a/video/arte_download_button.user.js +++ b/video/arte_download_button.user.js @@ -16,7 +16,7 @@ // @inject-into content // ==/UserScript== -function get_api_url() +function get_json_url() { const iframes = document.getElementsByTagName("iframe"); @@ -30,9 +30,9 @@ function get_api_url() return null; } -function get_video_url(url) +function get_video_url(json_url) { - const req = new Request(url); + const req = new Request(json_url); fetch(req).then(function(response) { return response.json(); @@ -66,12 +66,12 @@ function add_button(url) function main() { - if (document.getElementById("tastytea_downloadbutton") !== null) + if (document.getElementById("tastytea_downloadbutton") !== null) { return; } - const url = get_api_url(); + const url = get_json_url(); if (url === null) { return;