Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ua switch #27

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Update ua switch #27

wants to merge 3 commits into from

Conversation

taobert
Copy link

@taobert taobert commented Mar 29, 2020

Uaswitch no longer loads (and prevents the browser from starting). This PR updates luakit-plugins/uaswitch to use modes.add_cmds, settings rather than globals and the new _M style modules. (I'm assuming this is in line with #15, but that issue's light on details.)

A few things to pay extra attention to (I'm obviously happy to change anything):
- ua_strings.lua returns its table rather than assigning it (as _M can't be seen).
- A level of indirection is removed on startup: load() which just called load_ua_strings() is removed and load_ua_strings() called directly.
- A level of indirection is removed with the default ua handling: ua_alias_default is removed and "default" used explicitly. (As there was no benefit to having a variable.)

I also have the (2017 era) list of UAs from #16 staged and ready to commit, if you'd like those included in this. (I assumed since there was a separate issue, a separate PR were appropriate).

I also have an enhancement to call a menu to display known UAs staged and ready to commit.

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.

1 participant