SimpleSyndicate/static/ss.js

15 lines
564 B
JavaScript
Raw Normal View History

2019-01-21 08:19:54 -05:00
function load() {
sheet = document.getElementById("styleSheet").href.replace(/^.*\//, '');
select = document.getElementById("styleSheetSelector").value = sheet;
}
function swapStyleSheet() {
var sheet = document.getElementById("styleSheetSelector").value;
document.getElementById("styleSheet").setAttribute("href", "/static/" + sheet);
httpRequest = new XMLHttpRequest();
httpRequest.onreadystatechange = function() {console.log(httpRequest.responseText);};
httpRequest.open("GET", set_session_url + "?style_sheet=" + sheet, true);
httpRequest.send();
}