Last active
August 10, 2023 08:30
-
-
Save mvsde/d339346e2c6b38ac37eaccd377cf7b20 to your computer and use it in GitHub Desktop.
Accessibility testing bookmarklets
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
javascript:(function(){ | |
document.querySelectorAll(`link[rel="stylesheet"], style`).forEach((element) => element.remove()); | |
document.querySelectorAll(`*`).forEach((element) => element.removeAttribute(`style`)); | |
})(); |
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
javascript:(function(){ | |
document.querySelectorAll(`a`).forEach((element) => element.style.outline = `4px solid orange`); | |
})(); |
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
javascript:(function(){ | |
document.querySelectorAll(`details`).forEach((element) => element.open = true); | |
})(); |
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
javascript:(function(){ | |
const element = document.createElement(`div`); | |
element.style.padding = `1rem`; | |
element.style.background = `black`; | |
element.style.color = `yellow`; | |
element.innerText = document.title; | |
document.body.prepend(element); | |
})(); |
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
javascript:(function(){ | |
const timeout = prompt(`Show debugger in seconds`, 2); | |
setTimeout(function () { debugger }, timeout * 1000); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment