This file contains hidden or 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
| // Get the color value of .element:before | |
| var color = window.getComputedStyle( | |
| document.querySelector('.element'), ':before' | |
| ).getPropertyValue('color'); | |
| // Get the content value of .element:before | |
| var content = window.getComputedStyle( | |
| document.querySelector('.element'), ':before' | |
| ).getPropertyValue('content'); |
This file contains hidden or 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 addCSSRule(sheet, selector, rules, index) { | |
| if(sheet.insertRule) { | |
| sheet.insertRule(selector + "{" + rules + "}", index); | |
| } | |
| else { | |
| sheet.addRule(selector, rules, index); | |
| } | |
| } | |
| // Use it! |
This file contains hidden or 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
| // ==UserScript== | |
| // @name Straight Google | |
| // @id straight_google_pokerface | |
| // @version 1.17.13 | |
| // @author Pokerface - Kevin | |
| // @namespace in.co.tossing.toolkit.google | |
| // @description Remove URL redirection from google products | |
| // @license GPL v3 or later version | |
| // @downloadURL https://userscripts.org/scripts/source/121261.user.js | |
| // @updateURL https://userscripts.org/scripts/source/121261.meta.js |
This file contains hidden or 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
| /* ============================================================ | |
| * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ | |
| * | |
| * Open source under the BSD License. | |
| * | |
| * Copyright © 2008 George McGinley Smith | |
| * All rights reserved. | |
| * https://raw.github.com/danro/jquery-easing/master/LICENSE | |
| * ======================================================== */ |
This file contains hidden or 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
| body { | |
| -webkit-filter:grayscale(100%); | |
| -moz-filter:grayscale(100%); | |
| -ms-filter:grayscale(100%); | |
| -o-filter:grayscale(100%); | |
| filter:grayscale(100%); | |
| filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); | |
| filter:gray; | |
| -webkit-transform: translateZ(0); /* 解决在 Retina 屏幕下显示变模糊的问题 */ | |
| } |
This file contains hidden or 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
| _.mixin({ | |
| // This will parse a delimited string into an array of | |
| // arrays. The default delimiter is the comma, but this | |
| // can be overriden in the second argument. | |
| CSVtoJSON: function( strData, strDelimiter ){ | |
| // Check to see if the delimiter is defined. If not, | |
| // then default to comma. | |
| strDelimiter = (strDelimiter || ","); | |
| // FIX: add an ending carriage return if missing |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>ScrollIntoView() example</title> | |
| <script type="text/javascript"> | |
| function showIt(elID) { | |
| var el = document.getElementById(elID); | |
| el.scrollIntoView(true); | |
| } |
This file contains hidden or 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
| # editorconfig.org | |
| root = true | |
| [*] | |
| indent_style = space | |
| indent_size = 2 | |
| end_of_line = lf | |
| charset = utf-8 | |
| trim_trailing_whitespace = true | |
| insert_final_newline = true |
This file contains hidden or 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
| # JS files | |
| JS_FINAL = js/project-name-all.js | |
| JS_TARGETS = js/file1.js \ | |
| js/file2.js \ | |
| js/file3.js | |
| # CSS files | |
| CSS_FINAL = css/project-name-all.css | |
| STYLUS_TARGETS = css/file1.styl \ |
This file contains hidden or 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
| FROM ubuntu:14.04 | |
| MAINTAINER Pan Jiabang, [email protected] | |
| RUN \ | |
| # use aliyun's mirror for better download speed | |
| sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list && \ | |
| apt-get update && \ | |
| apt-get install -y nodejs curl git-core && \ | |
| # use nodejs as node |