Greasy Fork is available in English.

WFMU player timestamp link

Generates a timestamped link for easy bookmarking.

Fra 03.10.2017. Se den seneste versjonen.

// ==UserScript==
// @name         WFMU player timestamp link
// @namespace    https://greasyfork.org/en/users/27283-mutationobserver
// @version      2017-10-03--1
// @description  Generates a timestamped link for easy bookmarking.
// @author       MutationObserver
// @match        https://wfmu.org/archiveplayer/*
// @grant        none
// ==/UserScript==

var showPopup = false;

function bookmarkSave(){
	var t = document.querySelector('.mejs-currenttime').innerHTML;
	if (window.location.href.includes("&starttime=")) {
		var url = window.location.href.split("&");
		for (i = 0; i < url.length; i++) {
			if (url[i].includes("starttime=")) { url.splice(i, 1); }
		}
		url = url.join("&");
		url = url + "&starttime=" +t;
	}
	else { var url = window.location.href+"&starttime="+t; }
	url = url.split("#").join("");
	
	document.querySelector(".mejs-playpause-button").click();
	
	if (showPopup) { prompt("Bookmark", url); }
	else {
		butBookmarkLink.setAttribute("href", url);
		butBookmarkLink.classList.remove("unclicked");
		butBookmarkLink.innerHTML = showTitleAbbrev + " " + showDateAbbrev;
	}
}

var saveBut = `
<style id="bookmarkstyle">
body { background-color: #f1f1f1; }
#bookmark, #bookmarklink {
	display: flex; height: 50px;
	background-color: #D7EDF9;
	align-items: center;
	justify-content: center;
}
#bookmark {
    border: #a4caec 1px solid;
    width: 50%;
    margin-left: 25%;
    border-radius: 7px;
}
#bookmarklink {
    background-color: white;
    float: left;
    display: flex;
	margin-right: 25%;
    width: 25%;
    justify-content: left;
    padding-left: 1em;
	transition: all .2s ease-in-out;
}
#bookmarklink.unclicked {
    color: rgba(0, 0, 0, 0.36);
    text-decoration: none;
}
#bookmarklinkLabel {
    float: left;
    display: grid;
    width: 50%;
    justify-content: right;
    text-align: right;
    align-items: center;
    height: 50px;
	padding-right: 1em;
}
</style>
<a href="#" id="bookmark">generate link</a>
<div id="bookmarklinkLabel">Bookmark:</div><a href="#" id="bookmarklink" class="unclicked">&nbsp;</a>
`;
document.querySelector('.container').insertAdjacentHTML("afterend", saveBut);
document.querySelector('#bookmark').addEventListener ("click", bookmarkSave, false);
var butBookmarkLink = document.querySelector("#bookmarklink"); 
var showTitle = document.querySelector(".show-title");
var showTitleAbbrev = showTitle.innerHTML.match(/(.*) from /)[1].match(/\b(\w)/g).join('');
var tmp = showTitle.innerHTML.match(/ from ([0-9]*\/[0-9]*\/)[0-9]{0,2}([0-9]{2})$/); tmp.shift();
var showDateAbbrev = tmp.join('');