Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Test Script 275457
// @version 1
// @include *example.com/*
// @grant GM.getResourceUrl
// @require https://greasemonkey.github.io/gm4-polyfill/gm4-polyfill.js
// @require https://raw.githubusercontent.com/lodash/lodash/4.17.5/dist/lodash.min.js
// @resource soundA https://raw.githubusercontent.com/KDE/oxygen/master/sounds/Oxygen-Im-Contact-In.ogg
// @resource soundB https://raw.githubusercontent.com/KDE/oxygen/master/sounds/Oxygen-Sys-Special.ogg
// ==/UserScript===
class Queue {
constructor() {
this.storage = [];
}
enqueue(item) {
this.storage.push(item);
}
dequeue() {
return this.storage.shift();
}
import Html exposing (text, div, button)
import Time exposing (every, second)
import Html.Events exposing (onClick)
incrementIf : Bool -> Int -> Int
incrementIf bool number = if bool then number + 1 else number
sample: Signal Bool
sample =
Signal.sampleOn (every second) isRunning.signal