Created
April 25, 2012 02:30
-
-
Save ViliamKopecky/2485649 to your computer and use it in GitHub Desktop.
LESS/CSS each-second-refresh bookmark js
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
// ON/OFF switch LESS refreshing bookmark | |
(function(){ | |
window.lessRefreshing = !window.lessRefreshing; | |
console.log('LESS refreshing: '+(window.lessRefreshing ? 'ON' : 'OFF')); | |
var rf = function(){ | |
if(window.lessRefreshing) { | |
less.refresh(); | |
setTimeout(rf, 1000); | |
} else { | |
return false; | |
} | |
}; | |
rf(); | |
})(); | |
// inline for bookmark | |
javascript:(function(){window.lessRefreshing=!window.lessRefreshing;console.log('LESS refreshing: '+(window.lessRefreshing?'ON':'OFF'));var rf=function(){if(window.lessRefreshing){less.refresh();setTimeout(rf,1000);}else return false};rf()})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment