(http/https): https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)
^(\d+)\.\s
/*Force Sticky Header*/ | |
div#header{ | |
position: sticky!important; | |
top: 0; | |
z-index: 100; | |
} | |
/*Hide Overdue Assignments Section on Home*/ | |
div#overdue-submissions{ | |
display:none!important; |
var ratingContainer = document.getElementsByClassName("object-interaction-panel-rating")[0]; | |
var albumIdElement = ratingContainer.getElementsByTagName("ul")[0]; | |
var albumId = albumIdElement.id; | |
var rating = prompt("Please enter your rating out of 100, as a multiple of 5."); | |
var ratingHolderId = albumId.replace("star_","starUser_"); | |
document.getElementById(ratingHolderId).innerHTML = rating+'/100'; | |
star.update('onmousedown',albumIdElement); |
for (let i = 1; i < 8; i++) { | |
setTimeout(function timer() { | |
window.scrollTo({ top: document.body.scrollHeight, behavior: 'smooth' }) | |
if(i == 7) { | |
export_csv_favorites(); | |
} | |
}, i * 4000); | |
} | |
function export_csv_favorites() { |
//export_csv_favorites('page_recommendations_list_main'); | |
//export_csv_favorites('page_recommendations_list_non_affinity'); | |
function export_csv_favorites(passed_parent_id) { | |
const rows = [["Artist - Album","Year","Genres","RYM Link"]] | |
var title | |
var artist | |
var combined | |
var list = document.getElementById(passed_parent_id); |
getSpotispin(); | |
function getSpotispin() { | |
const rows = [["Artists-Album","Link"]] | |
var tableRows = document.querySelectorAll("tr.single_rec"); | |
for (i = 0; i < tableRows.length; i++) { | |
combined = tableRows[i].querySelectorAll("td.album_name")[0].innerText.trim(); | |
function customShuffle(x) { | |
var y = x.slice(1, x.length); | |
var j, t, i; | |
for (i = y.length - 1; i > 0; i--) { | |
j = Math.floor(Math.random() * (i + 1)); | |
t = y[i]; | |
y[i] = y[j]; | |
y[j] = t; | |
} | |
return [x[0]].concat(y); |
getRYMChart(); | |
function getRYMChart() { | |
const rows = [["Artist-Album","Release","Genres","Link"]] | |
var tables = document.querySelectorAll("div.chart_results_frame"); | |
var recTable = tables[0]; | |
var tableRows = recTable.querySelectorAll("div.topcharts_itembox"); |
window.addEventListener("load", function(event) { | |
var userratingdiv = document.getElementsByClassName("ratings")[0]; | |
const button = document.createElement('a'); | |
button.setAttribute("id", "rate-button"); | |
button.innerHTML = '<h3>Rate Album</h3>' | |
userratingdiv.insertBefore(button, userratingdiv.firstChild) | |
var userratingbutton = document.getElementById("rate-button"); |
function generateDownload(filename, text, type='text/plain') { | |
// Create an invisible A element | |
const a = document.createElement('a'); | |
a.style.display = 'none'; | |
document.body.appendChild(a); | |
// Set the HREF to a Blob representation of the data to be downloaded | |
a.href = window.URL.createObjectURL( | |
new Blob([text], { type }) | |
); |