Skip to content

Instantly share code, notes, and snippets.

@timdown
timdown / range_selection_save_restore.js
Last active January 27, 2024 18:41
Range and selection marker-element-based save and restore
/**
* This is ported from Rangy's selection save and restore module and has no dependencies.
* Copyright 2019, Tim Down
* Licensed under the MIT license.
*
* Documentation: https://github.com/timdown/rangy/wiki/Selection-Save-Restore-Module
* Use "rangeSelectionSaveRestore" instead of "rangy"
*/
var rangeSelectionSaveRestore = (function() {
var markerTextChar = "\ufeff";
@iiiBird
iiiBird / gulpfile.js
Last active July 30, 2020 17:50
gulp + open server
var gulp = require('gulp');
var browserSync = require('browser-sync');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');
var minifyCSS = require('gulp-minify-css');
var htmlreplace = require('gulp-html-replace');
var clean = require('gulp-clean');
var imagemin = require('gulp-imagemin');
var cache = require('gulp-cache');