Skip to content

Instantly share code, notes, and snippets.

View senott's full-sized avatar
🏠
Working from home

Diego de A. Senott senott

🏠
Working from home
View GitHub Profile
@Joseph-N
Joseph-N / addthis.js
Last active April 25, 2018 07:03
How to configure AddThis to work with Turbolinks - Rails 4
// turbolinks addthis
var initAdthis;
initAdthis = function(){
// Remove all global properties set by addthis, otherwise it won't reinitialize
for (var i in window) {
if (/^addthis/.test(i) || /^_at/.test(i)) {
delete window[i];
}
}