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
global.helloWorldText = 'Hello, world!'; | |
helloWorld = function() { | |
console.log(global.helloWorldText); | |
return global.helloWorldText; | |
}; | |
helloWorld(); |
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
// In a GitHub PR, you can run this script in a console to help automatically click the Viewed checkbox | |
// Worked as of 2023.12.18 | |
// JS snippet to click 'Viewed' on files that were deleted entirely, not changed or renamed | |
Array.from(document.querySelectorAll('.js-diff-load')).forEach(fileInfo => { | |
const text = fileInfo.nextElementSibling.textContent.trim(); | |
if(text.includes('This file was deleted.')) { | |
const viewedCheckbox = fileInfo.closest('.js-file.js-details-container').querySelector('.js-reviewed-checkbox'); | |
if(viewedCheckbox && !viewedCheckbox.checked) { | |
viewedCheckbox.click(); | |
} |
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>Change Text Example</title> | |
</head> | |
<body> | |
<h1>Change Text with JavaScript</h1> | |
<p id="myParagraph">This is the original text.</p> | |
<button onclick="changeText()">Change Text</button> | |
<button onclick="fooblap()">Button without a Function!</button> |
OlderNewer