From 29552bfce81c6f48cf59dad93d1cda55e4431cde Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Tue, 21 Jan 2020 18:01:54 +0100 Subject: [PATCH] Remove Google+ (*sniff*), fix spot.im --- _includes/comments.html | 11 ++--------- javascripts/comments.coffee | 12 +++++------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/_includes/comments.html b/_includes/comments.html index 6dbb9c5..29ee79f 100644 --- a/_includes/comments.html +++ b/_includes/comments.html @@ -1,7 +1,6 @@ @@ -17,16 +16,10 @@ -
-
Loading Google+ comments…
-
-
-
+
\ No newline at end of file diff --git a/javascripts/comments.coffee b/javascripts/comments.coffee index 2e02453..e9b047a 100644 --- a/javascripts/comments.coffee +++ b/javascripts/comments.coffee @@ -2,11 +2,13 @@ --- $(document).ready -> $('ul#comments-tabs li').not('.static').click -> - addScript = (script) -> + addScript = (script, data = {} ) -> scr = document.createElement 'script' scr.type = 'text/javascript' scr.async = true scr.src = script + for key, value of data + scr.setAttribute "data-#{key}", value (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild scr tab_id = $(this).attr 'data-div' @@ -18,14 +20,10 @@ $(document).ready -> addScript("//#{disqus_shortname}.disqus.com/embed.js") $(this).removeAttr 'data-service' - when 'google' - # load Google+ - addScript('//apis.google.com/js/plusone.js') - $(this).removeAttr 'data-service' - when 'spotim' # load spot.im - addScript('//www.spot.im/launcher/bundle.js') + addScript('//recirculation.spot.im/spot/sp_cNwZLN9Q') + addScript('//launcher.spot.im/spot/sp_cNwZLN9Q', { "post-id": window.spotim_postid, "spotim-module": "spotim-launcher" } ) $(this).removeAttr 'data-service' $('ul#comments-tabs li.hint').remove()