This file contains 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
// Playback keyboard controls script | |
// (currently only works on dedicated media pages) | |
// Configuration | |
var jump_distance_forward = 10; // Jump this many seconds forward using right arrow key. | |
var jump_distance_backward = 5; // Jump this many seconds backward using left arrow key. | |
var speed_step = 1/4; // Speed increased or decreased by this value using arrow keys up and down. | |
var volume_step = 1/10; // Volume increased or decreased by this value using +-. | |
var volume_step_fine = 1/100; // Volume increased or decreased by this value if below volume_step. | |
// Seek: 0 to 9 Reset the speed using "Insert". |
This file contains 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
// == Dependencies == | |
var mediaType; // for compatibility | |
var playerExists = false; // is set to true below if player exists | |
var checkMediaType_enabled = true; // for debugging purposes | |
var media_element = {}; // declaring as object | |
var tmp="",count=0; // initiating temporary variables used inside functions and loops | |
function checkMediaType() { | |
// checks whether it is a video or an audio tag |
This file contains 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
function download(filename, text) { | |
var tmp_node = document.createElement('a'); | |
tmp_node.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); | |
tmp_node.setAttribute('download', filename); | |
tmp_node.style.display = 'none'; | |
document.body.appendChild(tmp_node); | |
tmp_node.click(); |
This file contains 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 calcDate_data = {}; // initializing data object | |
function calcDate(date1, date2){ | |
// memorize input to detect invalid input | |
calcDate_data.input1 = date1; | |
calcDate_data.input2 = date2; | |
// initiate date object | |
var dt_date1 = new Date(date1); |
This file contains 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
rename -v "s/(:|\"|\*|\\|\||\&|\?|\%|\<|\>)/_/g" .* * |tee -a renamed_files.$(date +%Y%m%d%H%M%S).log |