Escaping apostrophes
This commit is contained in:
parent
f121af93c3
commit
906aff19ef
12
README.md
12
README.md
@ -92,7 +92,7 @@ To add the app that uses this plugin to the device's battery optimization whitel
|
|||||||
window.powerManagement.addAppToBatteryWhitelist(function() {
|
window.powerManagement.addAppToBatteryWhitelist(function() {
|
||||||
console.log('A dialog has popped up asking you to accept adding the app to the whitelist.');
|
console.log('A dialog has popped up asking you to accept adding the app to the whitelist.');
|
||||||
}, function() {
|
}, function() {
|
||||||
console.log('Failed to add the app to the device's battery optimization whitelist.');
|
console.log('Failed to add the app to the device\'s battery optimization whitelist.');
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -104,10 +104,10 @@ To check to see if the app that uses this plugin is on the device's battery opti
|
|||||||
```js
|
```js
|
||||||
window.powerManagement.isIgnoringBatteryOptimizations(function(result) {
|
window.powerManagement.isIgnoringBatteryOptimizations(function(result) {
|
||||||
if (result === 1) {
|
if (result === 1) {
|
||||||
console.log('This app IS on the device's battery optimization whitelist.');
|
console.log('This app IS on the device\'s battery optimization whitelist.');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log('This app IS NOT on the device's battery optimization whitelist.');
|
console.log('This app IS NOT on the device\'s battery optimization whitelist.');
|
||||||
}
|
}
|
||||||
}, function() {
|
}, function() {
|
||||||
console.log('Failed to add the app to the device's battery optimization whitelist.');
|
console.log('Failed to add the app to the device's battery optimization whitelist.');
|
||||||
@ -122,14 +122,14 @@ window.powerManagement.isIgnoringBatteryOptimizations(function(result) {
|
|||||||
window.powerManagement.addAppToBatteryWhitelist(function() {
|
window.powerManagement.addAppToBatteryWhitelist(function() {
|
||||||
console.log('A dialog has popped up asking you to accept adding the app to the whitelist.');
|
console.log('A dialog has popped up asking you to accept adding the app to the whitelist.');
|
||||||
}, function() {
|
}, function() {
|
||||||
console.log('Failed to add the app to the device's battery optimization whitelist.');
|
console.log('Failed to add the app to the device\'s battery optimization whitelist.');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log('This app IS NOT on the device's battery optimization whitelist.');
|
console.log('This app IS NOT on the device\'s battery optimization whitelist.');
|
||||||
}
|
}
|
||||||
}, function() {
|
}, function() {
|
||||||
console.log('Failed to add the app to the device's battery optimization whitelist.');
|
console.log('Failed to add the app to the device\'s battery optimization whitelist.');
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
Note that in all the above examples, all callbacks are optional.
|
Note that in all the above examples, all callbacks are optional.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user