Skip to content

New Extension: Addressbar Updater#1656

Open
srsutherland wants to merge 17 commits intonew-xkit:masterfrom
srsutherland:master
Open

New Extension: Addressbar Updater#1656
srsutherland wants to merge 17 commits intonew-xkit:masterfrom
srsutherland:master

Conversation

@srsutherland
Copy link
Copy Markdown

Periodically updates the address bar with so that when refreshed, it returns to the last viewed post. Useful for tab crashes, resuming after restart, or with extensions like "The Great Suspender"

I'm not in love with the image, but I can't figure out how else to represent an address bar in a 64x64 square
adressbar

Comment thread Extensions/addressbar.js Outdated
Comment thread Extensions/addressbar.js Outdated
Comment thread Extensions/addressbar.js Outdated
Comment thread Extensions/addressbar.js Outdated
Comment thread Extensions/addressbar.js Outdated
Comment thread Extensions/addressbar.js Outdated
Comment thread Extensions/addressbar.js
Comment thread Extensions/addressbar.js Outdated
Comment thread Extensions/addressbar.js Outdated
Copy link
Copy Markdown

@AprilSylph AprilSylph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a couple nitpicks

Comment thread Extensions/addressbar.js Outdated
Comment thread Extensions/addressbar.js Outdated
Copy link
Copy Markdown

@AprilSylph AprilSylph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's no need to leave comments on things that are either self-descriptive or obvious in meaning if you read the rest of the code

Comment thread Extensions/addressbar.js Outdated
Comment thread Extensions/addressbar.js Outdated
Comment thread Extensions/addressbar.js
Comment thread Extensions/addressbar.js Outdated
Comment thread Extensions/addressbar.js Outdated
Comment thread Extensions/addressbar.js
},

update_address: function() {
if (!XKit.extensions.addressbar.focus_only || document.hasFocus()) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XKit.extensions.addressbar.focus_only doesn't exist; you meant XKit.extensions.addressbar.preferences.focus_only

Comment thread Extensions/addressbar.js
if (id !== null && id > 1) {
XKit.extensions.addressbar.replace_address(id);
}
return id; //unused/debug
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

always remove debug lines

Comment thread Extensions/addressbar.js

update_address: function() {
if (!XKit.extensions.addressbar.focus_only || document.hasFocus()) {
//do nothing if you're not in focus
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment should be removed too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants