Last active
December 12, 2019 20:38
-
-
Save franciscocorrales/2ba2939aeec5141d23c03f37c7898bcb to your computer and use it in GitHub Desktop.
audible
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
*/ | |
(function () { | |
function changeSpeed(speed) { | |
$($("input[name=speedvalue]")[0]).val(speed); | |
$("input[name=speedvalue]")[0].click(); | |
} | |
function createMarkup() { | |
var elementExists = document.getElementById("fran-extention-main"); | |
if (elementExists) return; | |
$("body").prepend("<div id='fran-extention-main'>FranciscoPlaceholder</div>"); | |
} | |
function showPercentage() { | |
var progressbar = document.querySelector("div[role=progressbar]"); | |
if (!progressbar) { return; } | |
var percentage = progressbar.getAttribute("aria-valuenow"); | |
console.log("Percentage completed: " + percentage + "%"); | |
} | |
async function main() { | |
createMarkup() | |
showPercentage(); | |
} | |
main(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment