Skip to content

Instantly share code, notes, and snippets.

View palikhov's full-sized avatar
🐉
E5E / SRD 5.1 rus / Excel GM Tools

Anton Palikhov palikhov

🐉
E5E / SRD 5.1 rus / Excel GM Tools
View GitHub Profile
@palikhov
palikhov / HandoutsPurge.js
Created February 11, 2019 08:13
Handout Purge: delete all handouts (you will be asked if you want to delete this handout)
(function(){Campaign.handouts.forEach(h => {if(confirm(h.attributes.name)) h.destroy()})})()
@palikhov
palikhov / Fanburstmp3download.js
Created February 11, 2019 08:13
Fanburst MP3 Download: Downloads all Fanburst tracks in your Jukebox as a single .ZIP (hopefully). Requires B20 to be running.
(async () => {
const pAjaxLoad = url => {
const oReq = new XMLHttpRequest();
return new Promise((resolve, reject) => {
oReq.open("GET", url, true);
oReq.responseType = "arraybuffer";
oReq.onload = () => resolve({buff: oReq.response});
oReq.onerror = (e) => reject(new Error(`Error during request: ${e}`));
oReq.send();
});
@palikhov
palikhov / Fanburstmp3linkgrabber.js
Created February 11, 2019 08:14
Fanburst MP3 Link Grabber: Copies a newline-separated text dump containing links to all the Fanburst tracks in a game to your clipboard. You can then paste the links into e.g. Tab Save (https://chrome.google.com/webstore/detail/tab-save/lkngoeaeclaebmpkgapchgjdbaekacki) to mass-download them. This method avoids "Cross-Origin" errors.
copy(Jukebox.playlist.filter(it => it.attributes.source === "Fanburst").map(it => `https://api.fanburst.com/tracks/${it.attributes.track_id}/stream?client_id=0fc1df8b-40a4-4391-b0f7-d0257edb6634`).join("\n"));
@palikhov
palikhov / mp3-upload-direct-link.md
Created February 19, 2019 18:13 — forked from Moutard3/mp3-upload-direct-link.md
Tutorials / Walkthrough for uploading & getting direct link of sound file (mp3, ogg, ...)
@palikhov
palikhov / Roll20JukeboxClear.js
Created February 20, 2019 21:20
Console script: clear jukebox
(function(){
while(Jukebox.playlist.length) {
Jukebox.playlist.models[0].destroy();
}
d20.Campaign.save({jukeboxfolder: ""});
})();
@palikhov
palikhov / Roll20MediaSourcesDirectLink.md
Created February 20, 2019 21:23
Tutorials / Walkthrough for uploading & getting direct link of sound file (mp3, ogg, ...)
@palikhov
palikhov / FanburstGrabber.js
Created February 20, 2019 21:24
Console script to download from jukebox fanburst rracks
(async () => {
const pAjaxLoad = url => {
const oReq = new XMLHttpRequest();
return new Promise((resolve, reject) => {
oReq.open("GET", url, true);
oReq.responseType = "arraybuffer";
oReq.onload = () => resolve({buff: oReq.response});
oReq.onerror = (e) => reject(new Error(`Error during request: ${e}`));
oReq.send();
});
@palikhov
palikhov / FanburstGrabber.js
Created February 20, 2019 21:24
Console script to download from jukebox fanburst rracks
(async () => {
const pAjaxLoad = url => {
const oReq = new XMLHttpRequest();
return new Promise((resolve, reject) => {
oReq.open("GET", url, true);
oReq.responseType = "arraybuffer";
oReq.onload = () => resolve({buff: oReq.response});
oReq.onerror = (e) => reject(new Error(`Error during request: ${e}`));
oReq.send();
});
@palikhov
palikhov / YetAnotherDnD5elinks.md
Created February 21, 2019 04:52
another links
@palikhov
palikhov / Faerunian-calendar.js
Last active December 29, 2024 07:08
Calendar of Harptos for donjon calendar generator https://donjon.bin.sh/fantasy/calendar/
{"year_len":365,"events":1,"n_months":17,"months":["Hammer","Midwinter","Alturiak","cHES","Tarsakh","Greengrass","Mirtul","Kythorn","Flamerule","Midsummer","Shieldmeet","Eleasis","Eleint","Harvenstide","Marpenoth","Uktar","Nightal"],"month_len":{"Hammer":30,"Midwinter":1,"Alturiak":30,"cHES":30,"Tarsakh":30,"Greengrass":1,"Mirtul":30,"Kythorn":30,"Flamerule":30,"Midsummer":1,"Shieldmeet":1,"Eleasis":30,"Eleint":30,"Harvenstide":1,"Marpenoth":30,"Uktar":30,"Nightal":30},"week_len":10,"weekdays":["1","2","3","4","5","6","7","8","9","10"],"n_moons":1,"moons":["Selune"],"lunar_cyc":{"Selune":30},"lunar_shf":{"Selune":0},"year":1492,"first_day":0,"notes":{}}