Skip to content

Instantly share code, notes, and snippets.

View AlexRNL's full-sized avatar

Alex Barféty AlexRNL

View GitHub Profile
@AlexRNL
AlexRNL / BSDateFormatter.java
Created March 14, 2013 14:25
Transform timestamps in between <date></date> tags. in readable format.
package xml;
import java.io.BufferedWriter;
import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.text.SimpleDateFormat;
@AlexRNL
AlexRNL / checkEpisodes.js
Last active December 11, 2015 15:59
Script which allows to mark several episodes as selected when editing a series on theTVDB.To use it, copy the content of the gist and create a new bookmark with the content instead of the URL/link field.Tested and validated on Opera, Chrome, Firefox.
javascript:function checkField (field, rangeStart, rangeEnd) {
for (i = rangeStart-1; i < field.length && i <= rangeEnd-1; i++)
field[i].checked = true;
}
episodeCheckBox = document.getElementsByName('episode_selected[]');
checkField(episodeCheckBox, prompt("Enter the first episode to check", "1"), prompt("Enter the last episode to check", episodeCheckBox.length));
@AlexRNL
AlexRNL / BSAdFieldUnlocker.js
Created October 8, 2012 20:48
Script to unlock text fields on BetaSeries
javascript:function unlockAd () {
var el = document.getElementsByClassName('ayl_response_input')[0];
el.removeAttribute('disabled');
el.removeAttribute('value');
el.focus();
}
unlockAd();