Last active
February 7, 2025 19:15
-
-
Save treetop1500/4c4d972b152dd7d59c445c185bac3822 to your computer and use it in GitHub Desktop.
Custom Userway Link
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
<a role="button" | |
id="userway-trigger" | |
aria-label="Customize Accessibility Options" | |
onclick="UserWay.widgetOpen();" | |
style="cursor: pointer"> | |
Accessibility | |
</a> | |
<script> | |
(function(d) { | |
var s = d.createElement("script"); | |
s.src = "https://cdn.userway.org/widget.js"; | |
s.setAttribute("data-account", "iiLqquGMit"); | |
s.async = true; | |
s.defer = true; | |
s.onload = function() { | |
setTimeout(function() { | |
if (window.UserWay) { | |
try { | |
UserWay.iconVisibilityOff(); | |
console.log("UserWay widget hidden successfully"); | |
} catch (error) { | |
console.error("Error hiding UserWay widget:", error); | |
} | |
} else { | |
console.error("UserWay object not found"); | |
} | |
}, 1000); | |
}; | |
s.onerror = function() { | |
console.error("Failed to load UserWay script"); | |
}; | |
(d.body || d.head).appendChild(s); | |
})(document); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment