Skip to content

Instantly share code, notes, and snippets.

View jorgeluislazo's full-sized avatar

Jorge Luis Lazo jorgeluislazo

View GitHub Profile
@cmfcmf
cmfcmf / Update, edit and develop Tumblr Theme dynamically.js
Last active July 29, 2019 15:39
Creating and developing own tumblr themes has always been a pitty. However, this single line of javascript will help you A LOT. Follow the instuctions in the first comment below to get your own live version of your theme.
setInterval(function(){jQuery.ajax('YOUR-URL-TO-THE-THEME-FILE',{cache:false}).success(function(html){var btn=jQuery("div[data-action='update_preview']").first();if(html!=ace.edit('editor').getValue()){ace.edit('editor').setValue(html);if(!btn.hasClass('disabled'))btn.click()}});},1000);