aboutsummaryrefslogtreecommitdiff
path: root/bog.js
diff options
context:
space:
mode:
Diffstat (limited to 'bog.js')
-rw-r--r--bog.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/bog.js b/bog.js
index 55188e5..d8ee2a8 100644
--- a/bog.js
+++ b/bog.js
@@ -94,6 +94,18 @@ async function get (key) {
}
}
+async function getTitle (key) {
+ var log = await localforage.getItem('log')
+ if (log != null) {
+ for (var i = log.length - 1; i >= 0; --i) {
+ if (log[i].key === key) {
+ return log[i].text.substring(0, 15) + '…'
+ }
+ }
+ }
+}
+
+
// bog.getImage
function getImage (id, keys, classList) {