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'); | |
// Load the packages | |
var autoprefixer = require('gulp-autoprefixer'); | |
var minifycss = require('gulp-minify-css'); | |
var uglify = require('gulp-uglifyjs'); | |
var less = require('gulp-less'); | |
var livereload = require('gulp-livereload'); | |
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
#target Photoshop | |
app.bringToFront(); | |
main(); | |
function main(){ | |
if(!documents.length) return; | |
//iterate 5 loops incase of nested layersets | |
for(var t = 0; t<1;t++){ | |
var LayerSetLayers=[]; | |
var lSets = getLayerSets(); | |
for(var z in lSets){ |
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 changeClass = function (r,className1,className2) { | |
var regex = new RegExp("(?:^|\\s+)" + className1 + "(?:\\s+|$)"); | |
if( regex.test(r.className) ) { | |
r.className = r.className.replace(regex,' '+className2+' '); | |
}else{ | |
r.className = r.className.replace(new RegExp("(?:^|\\s+)" + className2 + "(?:\\s+|$)"),' '+className1+' '); | |
} | |
return r.className; | |
}; |
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
.ie67 .elem { | |
display: inline; | |
zoom: 1; | |
} |
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 setCSS() { | |
var docBody = document.getElementsByTagName('body'); | |
docBody[0].className = 'svg'; | |
} | |
function SVGDetect() { | |
var testImg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNzUiIGhlaWdodD0iMjc1Ij48L3N2Zz4%3D'; | |
var img = document.createElement('img'); | |
img.setAttribute('src', testImg); |
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
<a href="/" class="site-logo"> | |
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" alt=" " class="logo "> | |
</a> |
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
document.body.className += ' hasJS' |
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
document.body.className = 'hasJS'; |
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
this.value |
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 changeClass(elem,className1,className2){ | |
elem.className = (elem.className == className1)?className2:className1; | |
} | |
document.getElementById('menutoggle').onclick = function() { | |
changeClass(this, 'navtoogle active', 'navtoogle'); | |
} | |
// Many thanks to https://twitter.com/Martel_Louis |
NewerOlder