Skip to content

Commit debde67

Browse files
committed
kbutton to kButton
1 parent 0677095 commit debde67

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

src/chat/bookmarks.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ async function addBookmark (context, target) {
172172
return bookmark
173173
}
174174

175-
export async function toggleBookmark (userContext, target, bookmarkbutton) {
175+
export async function toggleBookmark (userContext, target, bookmarkButton) {
176176
await store.fetcher.load(userContext.bookmarkDocument)
177177
const bookmarks = store.each(
178178
null,
@@ -186,7 +186,7 @@ export async function toggleBookmark (userContext, target, bookmarkbutton) {
186186
for (let i = 0; i < bookmarks.length; i++) {
187187
try {
188188
await updatePromise(store.connectedStatements(bookmarks[i]), [])
189-
bookmarkbutton.style.backgroundColor = 'white'
189+
bookmarkButton.style.backgroundColor = 'white'
190190
debug.log('Bookmark deleted: ' + bookmarks[i])
191191
} catch (e) {
192192
debug.error('Cant delete bookmark:' + e)
@@ -195,36 +195,36 @@ export async function toggleBookmark (userContext, target, bookmarkbutton) {
195195
}
196196
} else {
197197
const bookmark = await addBookmark(userContext, target)
198-
bookmarkbutton.style.backgroundColor = 'yellow'
198+
bookmarkButton.style.backgroundColor = 'yellow'
199199
debug.log('Bookmark added: ' + bookmark)
200200
}
201201
}
202202

203203
export async function renderBookmarksButton (userContext, target) {
204-
async function setBookmarkbuttonColor (bookmarkbutton) {
204+
async function setBookmarkButtonColor (bookmarkButton) {
205205
await store.fetcher.load(userContext.bookmarkDocument)
206206
const bookmarked = store.any(
207207
null,
208208
BOOK('recalls'),
209-
bookmarkbutton.target,
209+
bookmarkButton.target,
210210
userContext.bookmarkDocument
211211
)
212-
bookmarkbutton.style = UI.style.buttonStyle
213-
if (bookmarked) bookmarkbutton.style.backgroundColor = 'yellow'
212+
bookmarkButton.style = UI.style.buttonStyle
213+
if (bookmarked) bookmarkButton.style.backgroundColor = 'yellow'
214214
}
215215

216-
let bookmarkbutton
216+
let bookmarkButton
217217
if (userContext.bookmarkDocument) {
218-
bookmarkbutton = UI.widgets.button(
218+
bookmarkButton = UI.widgets.button(
219219
dom,
220220
UI.icons.iconBase + BOOKMARK_ICON,
221221
label(BOOK('Bookmark')),
222222
() => {
223-
toggleBookmark(userContext, target, bookmarkbutton)
223+
toggleBookmark(userContext, target, bookmarkButton)
224224
}
225225
)
226-
bookmarkbutton.target = target
227-
await setBookmarkbuttonColor(bookmarkbutton)
228-
return bookmarkbutton
226+
bookmarkButton.target = target
227+
await setBookmarkButtonColor(bookmarkButton)
228+
return bookmarkButton
229229
}
230230
}

src/chat/messageTools.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,15 @@ export function messageToolbar (message, messageRow, userContext, channelObject)
146146
} // if mine
147147
// Things anyone can do if they have a bookmark list async
148148
/*
149-
var bookmarkbutton = await bookmarks.renderBookmarksButton(userContext)
150-
if (bookmarkbutton) {
151-
div.appendChild(bookmarkbutton)
149+
var bookmarkButton = await bookmarks.renderBookmarksButton(userContext)
150+
if (bookmarkButton) {
151+
div.appendChild(bookmarkButton)
152152
}
153153
*/
154154
// Things anyone can do if they have a bookmark list
155155

156-
renderBookmarksButton(userContext).then(bookmarkbutton => {
157-
if (bookmarkbutton) div.appendChild(bookmarkbutton)
156+
renderBookmarksButton(userContext).then(bookmarkButton => {
157+
if (bookmarkButton) div.appendChild(bookmarkButton)
158158
})
159159

160160
/** Button to allow user to express a sentiment (like, endorse, etc) about a target

0 commit comments

Comments
 (0)