Created
December 5, 2018 09:15
-
-
Save schnabear/5c394b75781d92b38416732f299cffb3 to your computer and use it in GitHub Desktop.
updateBadge HTML
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>updateBadge</title> | |
<script> | |
function updateBadgeCount() { | |
var badgeCountEl = document.querySelector('#badgeCount'); | |
var customLocation = "native://updateBadge?count=" + badgeCountEl.value; | |
console.log(customLocation); | |
document.location.href = customLocation; | |
} | |
</script> | |
</head> | |
<body> | |
<a href="native://updateBadge?count=0">Count 0</a> | |
<a href="native://updateBadge?count=5">Count 5</a> | |
<a href="native://updateBadge?count=10">Count 10</a> | |
<a href="native://updateBadge?count=100">Count 100</a> | |
<form action="#"> | |
<input type="text" value="" id="badgeCount" /> | |
<button type="button" onclick="updateBadgeCount()">SET</button> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment