Skip to content

Instantly share code, notes, and snippets.

View FredrikWendt's full-sized avatar

Fredrik Wendt FredrikWendt

View GitHub Profile
#!/usr/bin/env python
#
# Watches the dropfolder, and kicks off the dropfolder-scanner when a file is closed
#
import pyinotify, os, logging
logging.basicConfig(filename='/tmp/dropfolder.log')
logger = logging.getLogger('watcher')
logger.setLevel(logging.INFO)
<html>
<head>
<title>Very nice web page</title>
</head>
<body background="white">
<h1>Welcome!</h1>
<p>This is a paragraph. It rocks!</p>
</body>
</html>
window.addEventListener('keydown', function(event) {
if ((event.metaKey || event.ctrlKey) && event.key === 'Enter') {
let buttons = document.getElementsByClassName("uiButton");
for (let i = 0; i < buttons.length; i++) {
let button = buttons[i];
if (button.attributes && button.attributes["data-selenium-test"]) {
if (button.attributes["data-selenium-test"].value === "UniversalSaveBar-button-primary") {
button.click();
break;
}