This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function duplicateElement(element) { | |
var newElement = document.createElement(element.tagName); | |
document.body.appendChild(newElement); | |
var newStyle = window.getComputedStyle(element, null).cssText; | |
var baseProperties = window.getComputedStyle(newElement, null).cssText.split(';').map(function (e) { | |
return e.trim(); | |
}); | |
newElement.innerHTML = element.innerHTML; | |
//Remove styles with default value | |
newElement.style.cssText = newStyle.split(';').map(function (e) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function timeout(func, limit) { | |
var url = URL.createObjectURL(new Blob( | |
['(', func.toString(), ')()'], { | |
type: 'application/javascript' | |
})); | |
worker = new Worker(url); | |
URL.revokeObjectURL(url); | |
setTimeout(function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
$.fn.shadow = function () { | |
this.each(function () { | |
var text = this.innerText; | |
this.createShadowRoot() | |
.innerHTML = "<style>:host::after{content:'" + text + "'}</style>"; | |
}); | |
return this; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (url, undefined) { | |
"use strict"; | |
var _params = {}; | |
var _hash = {}; | |
function buildParams(obj) { | |
return Object.keys(obj).length ? | |
"?" + Object.keys(obj).map(function(e) { | |
return encodeURIComponent(e) + "=" + encodeURIComponent(obj[e]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function normalize(s) { | |
return s.toLowerCase().replace(/[^a-z]/g, ""); | |
} | |
Object.defineProperty(String.prototype, "isPalindrome", { | |
get: function () { | |
var rev = this.split("").reverse().join(""); | |
return normalize(rev) === normalize(this); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require("gulp"); | |
var buffer = require("vinyl-buffer"); | |
var source = require("vinyl-source-stream"); | |
var sourcemaps = require("gulp-sourcemaps"); | |
var sass = require("gulp-ruby-sass"); | |
var rename = require("gulp-rename"); | |
var autoprefixer = require("gulp-autoprefixer"); | |
var minifycss = require("gulp-minify-css"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
D̝͍I̓ͪ͌ͤṢ̗̌̌̍͐̅̾ͤR̬̹̠͚̬͖ͣͣ͐ͪ̽̊Ư̝͔ͪ̄̏̈́̕P̷̼͆ͥ̉͒͂͒ͨ͐̆͠ͅT̫̜̜̜̟̎ͫ͋̑̅͛I̶̶̧̖̟̩̭̪̻̳͍̳̠̺̻̣̓̂̑̚͝V̈́ͭ̄ͣ̾̋̎̑͐ͤͪ͂͊̍́ͮ͊̉҉̷͙͔̤̮̣͍̺̮̳͍̭̭͘È̡͙̖̪͙͔̦͉̭̖͍̜͉̪̪͈̺͍͇ͫ̓͐̄ͬ̈́̏͊͒̌͌͗͟͝͡ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"always_show_minimap_viewport": true, | |
"bold_folder_labels": true, | |
"caret_extra_bottom": 1, | |
"caret_extra_top": 1, | |
"caret_extra_width": 1, | |
"caret_style": "phase", | |
"color_scheme": "Packages/User/SublimeLinter/Oceanic Next (SL).tmTheme", | |
"drag_text": false, | |
"draw_minimap_border": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
/*********************************************** | |
* Javascript Generator Script by PGReviews (Physicsguy's Reviews) | |
* Visit /web/20090808182931/http://www.execulink.com/~kayes/physicsguy/web/ for reviews, guitar tablature, and more! | |
* This notice must stay intact for legal use | |
***********************************************/ | |
function welcome3() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
const vm = require("vm"); | |
const util = require("util"); | |
const Constants = require("../constants"); | |
let helpText = `you can evaluate **JS code and expressions** with \`!eval\`! | |
:information_source: Just use \`!eval <code>\`. |
OlderNewer