From 9bd27e0d83f7c2449236f21ddc2e71b49ae7f90e Mon Sep 17 00:00:00 2001 From: Kevin Mulvey Date: Wed, 31 Dec 2014 12:01:27 -0500 Subject: [PATCH 1/2] default to current page --- js/push.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/push.js b/js/push.js index 818f4ea..07bf70c 100644 --- a/js/push.js +++ b/js/push.js @@ -464,7 +464,7 @@ head.innerHTML = responseText; } - data.title = head.querySelector('title'); + data.title = head.querySelector('title') ? head.querySelector('title') : document.querySelector('title'); var text = 'innerText' in data.title ? 'innerText' : 'textContent'; data.title = data.title && data.title[text].trim(); From a2691c2ddc8db4f56d46a25893a87f60b2eaad4f Mon Sep 17 00:00:00 2001 From: Kevin Mulvey <king.feruke@gmail.com> Date: Wed, 7 Jan 2015 07:49:02 -0500 Subject: [PATCH 2/2] use || rather than ternary --- js/push.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/push.js b/js/push.js index 07bf70c..6039bb7 100644 --- a/js/push.js +++ b/js/push.js @@ -464,7 +464,7 @@ head.innerHTML = responseText; } - data.title = head.querySelector('title') ? head.querySelector('title') : document.querySelector('title'); + data.title = head.querySelector('title') || document.querySelector('title'); var text = 'innerText' in data.title ? 'innerText' : 'textContent'; data.title = data.title && data.title[text].trim();