Skip to content
This repository was archived by the owner on Mar 29, 2018. It is now read-only.

Commit eb5df22

Browse files
author
Daniel Cormier
committed
Handle missing API key better.
1 parent f2ffb86 commit eb5df22

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

options.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
</div>
3131
<br>
3232
<div id="devices">
33-
Enter your Pushbullet Access Token above and click save to view available devices for notifications to be pushed to.
3433
</div>
3534
<br />
3635
<div>

options.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ function load_devices(saved_devices, removeInvalidIds)
3232
{
3333
var div_devices = $("#devices");
3434

35+
if (!PushBullet.APIKey) {
36+
div_devices.empty().append(
37+
$("<div>").addClass("loading").append($("<small>").append("Enter your Pushbullet Access Token above and click save to see devices to push notifications to."))
38+
);
39+
40+
return;
41+
}
42+
3543
div_devices.empty().append(
3644
$("<div>").addClass("loading").append($("<small>").append("Loading devices from PushBullet..."))
3745
);

0 commit comments

Comments
 (0)