From 56f70fc4ab55b9acc700c1569d5901358ffed41f Mon Sep 17 00:00:00 2001 From: Paul Griffin Petty Date: Tue, 23 Sep 2014 14:23:36 -0400 Subject: [PATCH] ie9 doesn't support location.origin --- bsp-share.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bsp-share.js b/bsp-share.js index d9ef4fe..9fecde2 100644 --- a/bsp-share.js +++ b/bsp-share.js @@ -10,8 +10,8 @@ '_defaultOptions': { "service" : "", "title" : document.title !== undefined ? encodeURIComponent(document.title) : "", - "url" : window.location.origin + window.location.pathname, - "redirectUrl" : window.location.origin + window.location.pathname, + "url" : window.location.protocol + "//" + window.location.hostname + window.location.pathname, + "redirectUrl" : window.location.protocol + "//" + window.location.hostname + window.location.pathname, "description" : $("meta[property='og:description']").attr('content') !== undefined ? encodeURIComponent($( "meta[property='og:description']").attr('content')) : "", "caption" : $("meta[property='og:caption']").attr('content') !== undefined ? encodeURIComponent($( "meta[property='og:caption']").attr('content')) : "", "image" : $("meta[property='og:image']").attr('content') !== undefined ? encodeURIComponent($( "meta[property='og:image']").attr('content')) : "",