Skip to content

Instantly share code, notes, and snippets.

@cuylerstuwe
Created May 27, 2018 15:55
Show Gist options
  • Select an option

  • Save cuylerstuwe/092621e21606d0075f4b5b40f0b637d2 to your computer and use it in GitHub Desktop.

Select an option

Save cuylerstuwe/092621e21606d0075f4b5b40f0b637d2 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name CSW Allow MIDI
// @namespace salembeats
// @version 1
// @description .
// @author Cuyler Stuwe (salembeats)
// @include https://work.crowdsurfwork.com/tasks/*
// @grant none
// ==/UserScript==
function main() {
for(const iframe of document.querySelectorAll("iframe")) {
if(!!iframe.getAttribute("allow")) {
iframe.setAttribute("allow", iframe.getAttribute("allow") + ", midi");
}
else {
iframe.setAttribute("allow", "midi");
}
}
}
main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment