Skip to content

Instantly share code, notes, and snippets.

View SethClydesdale's full-sized avatar

Seth Clydesdale SethClydesdale

View GitHub Profile
@SethClydesdale
SethClydesdale / ruby-position-under-polyfill.css
Last active July 5, 2020 17:41
Polyfill for ruby-position:under; Hackishly displays the <rt> tag underneath the <ruby> tag.
/*
* browser support: Webkit, Gecko, MS browsers [ALL OK]
* sauce: https://twitter.com/SethC1995/status/1279827154788913152 (extra info in self-replies)
*/
/* text-align, font-size, margin, bottom, line-/height may all be adjusted to fit preferences */
ruby {
text-align:center;
display:inline-block;
position:relative;
@SethClydesdale
SethClydesdale / ezquiz.js
Created January 15, 2020 15:14
EZQuiz variant that randomizes the order of questions. First file is for editing/pre-production use, second file is for use in production.
// # FUNCTIONALITY FOR EXERCISES #
(function (window, document) {
'use strict';
// primary object for functionality of the quizzes
window.EZQuiz = {
// exercise statistics
stats : {
problems : 0, // number of problems to solve in the lesson
@SethClydesdale
SethClydesdale / chart-grabber.js
Last active September 5, 2017 01:48
Grabs drop chart data from Ephinea for use with the drop charts addon : https://github.com/SethClydesdale/psobb-drop-charts
// script used for grabbing drop charts from ephinea
// https://ephinea.pioneer2.net/drop-charts/normal/
// HOW TO USE
// Paste the script in your console (F12/CTRL+SHIFT+I > Console) and execute it while viewing a drop chart,
// the lua table will automatically be copied to your clipboard.
// Delete the contents of the respective difficulty file (i.e. normal, hard, very hard, etc...) and add "return" to the beginning
// of the file, once you've done this, paste the previously copied code and save.
// Repeat the above steps for each difficulty.
@SethClydesdale
SethClydesdale / onStyleChange.js
Last active July 18, 2017 16:22
Listens for changes in a stylesheet
// listen for changes in a stylesheet every 100ms (can change to fit needs)
function onStyleChange (stylesheet, callback) {
// gets the entire CSSText of a stylesheet
var getCSSText = function (stylesheet) {
stylesheet = stylesheet.sheet.cssRules;
var i, rules = '';
for (i in stylesheet) {
rules += stylesheet[i].cssText || '';