Skip to content

Instantly share code, notes, and snippets.

@tidusx18
Created October 4, 2017 18:01
Show Gist options
  • Save tidusx18/3296861a6f6de6ee73e5f75d4a69d6e5 to your computer and use it in GitHub Desktop.
Save tidusx18/3296861a6f6de6ee73e5f75d4a69d6e5 to your computer and use it in GitHub Desktop.
var destinationCourseId = document.querySelector('a[href*="cpbucket"]').href.split('/')[3];
var copyURL = 'https://fiu.blackboard.com/webapps/blackboard/execute/cp_copy_content?navItem=cp_copy_course&course_id=_89343_1&target=no';
var newWindow = window.open(copyURL, 'GET');
document.addEventListener('DOMContentLoaded', function() {
// Edit options below as needed
newWindow.document.getElementById('destinationCourseId').value = destinationCourseId;
newWindow.document.getElementById('copyLinkToCourseFiles').checked = true;
newWindow.document.getElementById('toc_1567112_1_id').click();
newWindow.document.getElementById('selectCourse').submit();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment