25 lines
724 B
JavaScript
25 lines
724 B
JavaScript
/* Depends on cookies.js */
|
|
/* sheets.js; Deven Blake 2021 */
|
|
/* @license magnet:?xt=urn:btih:e95b018ef3580986a04669f1b5879592219e2a7a&dn=public-domain.txt Public Domain */
|
|
|
|
/* sets the sheet to the sheet in the cookie, if the user saved their
|
|
* preferences */
|
|
window.initializesheets = function() {
|
|
var sheet;
|
|
if((sheet = window.getCookie('sheet')) != '')
|
|
window.setStyling(sheet);
|
|
};
|
|
|
|
/* fetches the current styling value */
|
|
window.getStyling = function(){
|
|
return document.getElementById('styling').getAttribute('href');
|
|
};
|
|
|
|
/* sets the stylesheet to the file at `sheet` */
|
|
window.setStyling = function(sheet){
|
|
document.getElementById('styling').setAttribute('href', sheet);
|
|
return sheet;
|
|
};
|
|
|
|
/* @license-end */
|