Skip to content

Instantly share code, notes, and snippets.

function forwardPlayers(doc = document) {
doc.querySelectorAll(".vjs-v8").forEach(player => {
if (player.player.currentTime() < player.player.duration() - 1) {
player.player.currentTime(player.player.duration() - 0.1);
logs.push(["forwarded: ", player]);
}
});
}
function clickNext(doc = document) {
@tsi
tsi / profile.json
Last active January 26, 2025 12:18
profile.json
{
"playerOptions": {
"private_cdn": true,
"secure_distribution": "content.toastmasters.org"
},
"sourceOptions": {
"sourceTypes": ["hls"]
}
}
@tsi
tsi / input.scss
Created September 19, 2022 14:12
Generated by SassMeister.com.
$text-color: #0c163b;
@function HEX2RGB($hex) {
@return #{red($hex)},#{green($hex)},#{blue($hex)};
}
.a {
color: HEX2RGB($text-color);
}
{
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36",
"environment": {
"networkUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4420.0 Safari/537.36 Chrome-Lighthouse",
"hostUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36",
"benchmarkIndex": 1585.5,
"credits": {
"axe-core": "4.2.3"
}
},
@tsi
tsi / Map.js
Created August 8, 2016 14:52
Simplest open-layers ReactJS component basic example
import React, { Component } from 'react';
require('ol3-google-maps');
require('openlayers/css/ol.css');
require('./Map.scss');
export default class Map extends Component {
componentDidMount() {
Settings
@tsi
tsi / _ir.scss
Created February 21, 2016 09:00
// ----------------------------------------------
// Image Replacement
// ----------------------------------------------
@mixin ir($img, $width: image-width($img), $height: image-height($img), $x: 50%, $y: 50%) {
background: {
image: image-url($img);
repeat: no-repeat;
position: $x $y;
};
@tsi
tsi / dpm_list.php
Created October 29, 2014 14:41
dpm_list()
<?php
function dpm_list($group) {
dpm(array_keys((array) $group));
}
@tsi
tsi / _layout.scss
Last active August 29, 2015 14:04
My layout helper scss partial
// ----------------------------------------------
// Layout
// ----------------------------------------------
// Settings
$container: 960px !default;
$flow: left !default;
$opos: if($flow == left, right, left);
@tsi
tsi / layout-mixin.scss
Last active August 29, 2015 14:01
Salsa style, simplifyed layout mixin.
/////////////////////////////////////////////////
//// Salsa style layout mixin. Simplified. ////
/////////////////////////////////////////////////
// See usage examples below.
$flow: left !default;
$opos: if($flow == left, right, left);
// Compass is needed only for the box-sizing() mixin.