Merge branch 'master' of github.com:cmcaine/tridactyl into glacambre-fix_#357

This commit is contained in:
Oliver Blanthorn 2018-04-02 12:46:06 +01:00
commit f0cedd149f
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3
5 changed files with 10 additions and 15 deletions

View file

@ -6,7 +6,7 @@ Replace Firefox's default control mechanism with one modelled on the one true ed
## Installing
[Get our "beta" builds!][amo-betas] These are updated on AMO with each commit to master on this repo; your browser will automatically update from there once a day. If you want more frequent updates, you can change `extensions.update.interval` in `about:config` to whatever time you want, say, 15 minutes (900 seconds). Changelogs for the stable versions on the AMO can be found [here](https://github.com/cmcaine/tridactyl/blob/master/doc/changelog.md).
[Get our "beta" builds!][betas] These are updated with each commit to master on this repo. Soon, your browser will automatically update from there once a day. If you want more frequent updates, you can change `extensions.update.interval` in `about:config` to whatever time you want, say, 15 minutes (900 seconds). Changelogs for the stable versions on the AMO can be found [here](https://github.com/cmcaine/tridactyl/blob/master/doc/changelog.md).
Type `:help` for online help once you're in :)
@ -393,4 +393,4 @@ The logo was designed by Jake Beazley using free vector art by <a target="_blank
[gitter-link]: https://gitter.im/tridactyl/Lobby
[matrix-badge]: https://matrix.to/img/matrix-badge.svg
[matrix-link]: https://riot.im/app/#/room/#tridactyl:matrix.org
[amo-betas]: https://addons.mozilla.org/en-US/firefox/addon/tridactyl-vim/versions/beta
[betas]: https://tridactyl.cmcaine.co.uk/betas

View file

@ -11,14 +11,6 @@ publish_beta() {
npm run clean
npm run build
scripts/version.js beta
sign_and_submit
}
publish_sideload() {
npm run clean
npm run build
scripts/version.js beta
sed 's/"name": "Tridactyl"/"name": "Tridactyl Sideload"/' -i build/manifest.json
sed 's/tridactyl.vim@cmcaine/tridactyl.vim.betas@cmcaine/' -i build/manifest.json
sign_and_submit
}

View file

@ -53,7 +53,7 @@ const DEFAULTS = o({
"gg": "scrollto 0",
"$": "scrollto 100 x",
// "0": "scrollto 0 x", // will get interpreted as a count
"^": "scrollto 0 x",
"^": "buffer #",
"H": "back",
"L": "forward",
"d": "tabclose",

View file

@ -624,15 +624,12 @@ loadaucmds()
//@hidden
//#content
export async function loadaucmds(){
console.log("AUCMDS TRIED TO RUN")
// for some reason, this never changes from the default, even when there is user config (e.g. set via `aucmd bbc.co.uk mode ignore`)
let aucmds = await config.getAsync("autocmds", "DocStart")
console.log(aucmds)
const ausites = Object.keys(aucmds)
// yes, this is lazy
const aukey = ausites.find(e=>window.document.location.href.includes(e))
if (aukey !== undefined){
console.log(aukey)
Messaging.message("commandline_background", "recvExStr", [aucmds[aukey]])
}
}

View file

@ -21,7 +21,11 @@ const logger = new Logger('finding')
function elementswithtext() {
return DOM.getElemsBySelector("*",
// offsetHeight tells us which elements are drawn
[hint => {
return ((hint as any).offsetHeight > 0 && (hint as any).offsetHeight !== undefined)
},
hint => {
return hint.textContent != ""
}]
)
@ -31,6 +35,7 @@ function elementswithtext() {
class findState {
readonly findHost = document.createElement('div')
public mark = new Mark(elementswithtext())
// ^ why does filtering by offsetHeight NOT work here
public markedels = []
public markpos = 0
public direction: 1 | -1 = 1
@ -76,7 +81,8 @@ function reset(args?) {
function mode(mode: "nav" | "search"){
if (mode == "nav"){
// really, this should happen all the time when in search - we always want first result to be green and the window to move to it (if not already on screen)
findModeState.markedels = Array.from(window.document.getElementsByTagName("mark"))
findModeState.markedels = Array.from(window.document.getElementsByTagName("mark")).filter(el => el.offsetHeight > 0)
// ^ why does filtering by offsetHeight work here
findModeState.markpos = 0
let el = findModeState.markedels[0]
if (!DOM.isVisible(el)) el.scrollIntoView()