Last active
October 19, 2022 20:38
-
-
Save andresgcarmona/e198b4ae27e454969ee45b611c311c53 to your computer and use it in GitHub Desktop.
Bookmarlets
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
// find duplicate Id's in DOM | |
const allElements = document.getElementsByTagName("*"); | |
const allIds = {}; | |
let found = false; | |
for (let i = 0, n = allElements.length; i < n; ++i) { | |
const id = allElements[i].id; | |
if (id) { | |
if (allIds[id] === undefined) { | |
allIds[id] = 1; | |
} else { | |
found = true; | |
console.warn('Duplicate ID #' + id); | |
} | |
} | |
} | |
if (!found) { | |
console.log('No duplicate IDs found'); | |
} |
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
const css = document.createElement("style"); | |
css.type = "text/css"; | |
css.innerHTML = "img[alt=\"\"],img:not([alt]){ filter:grayscale(100%) }"; | |
document.body.appendChild(css); |
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
var link = document.createElement("link"); | |
link.href = prompt("css url", ""); | |
link.type = "text/css"; | |
link.rel = "stylesheet"; | |
document.getElementsByTagName("head")[0].appendChild(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
$('.ghx-avatar').each(function() { | |
const str = $(this)[0].outerHTML; | |
if (str.indexOf("Assignee:") >= 0) { | |
$(this).parent().hide(); | |
} | |
}) |
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
// Hide assigned jira tickets | |
var jq = document.createElement('script'); | |
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); |
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
var md = "[[" + document.URL + "][" + document.title + "]]" ; | |
prompt("Enter Ctrl+C to copy this org-mode hyperlink. :", md); |
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
var baseUrl = "https://web.archive.org/web/*/" | |
var urlmod = document.URL | |
window.location.href = baseUrl + urlmod |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment