Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyVerbruggen committed Jan 30, 2014
1 parent c3c5177 commit 05ec015
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ <h1>Plugins Demo</h1>
<button onclick="window.plugins.toast.showShortBottom('Hello there!', function(a){console.log('toast success: ' + a)}, function(b){alert('toast error: ' + b)})">Show a toast at the bottom</button>
</p>
<p>
<button onclick="window.plugins.flashlight.toggle(function(e){console.log(e)}, function(a){alert(e)})">Toggle Flashlight</button>
<button onclick="flashlightDemo()">Toggle Flashlight</button>
</p>
<p>
<button onclick="sslcertificatecheckerDemo(true)">SSL check-ok</button>
Expand All @@ -47,12 +47,12 @@ <h1>Plugins Demo</h1>
<script type="text/javascript" src="phonegap.js"></script>

<!-- plugins -->
<script src="js/plugins/Calendar.js"></script>
<script src="js/plugins/Flashlight.js"></script>

<!-- plugins demo -->
<script src="js/socialsharing-plugin-demo.js"></script>
<script src="js/calendar-plugin-demo.js"></script>
<script src="js/flashlight-plugin-demo.js"></script>
<script src="js/sslcertificatechecker-plugin-demo.js"></script>
<script src="js/webview-background-color-plugin-demo.js"></script>
<script src="js/videocaptureplus-plugin-demo.js"></script>
Expand Down
11 changes: 11 additions & 0 deletions js/flashlight-plugin-demo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"use strict";

function flashlightDemo() {
window.plugins.flashlight.available(function(isAvailable) {
if (isAvailable) {
window.plugins.flashlight.toggle();
} else {
alert("Flashlight not available on this device");
}
})
}

0 comments on commit 05ec015

Please sign in to comment.