Florian Bruhin
9320214429
Only clear favicons on load with QtWebKit
...
QtWebEngine seems to automatically clear the favicon when loading e.g.
about:blank, and not clearing it there again fixes #3469 .
Original issue: #187
2018-03-05 18:29:01 +01:00
Florian Bruhin
a796d1f33f
Always enable JavaScript for file://, chrome:// and qute://
...
See #3622
2018-03-05 17:09:47 +01:00
Florian Bruhin
a1b73fc113
Elide long URLs in acceptNavigationRequest logging
2018-03-05 16:42:14 +01:00
Florian Bruhin
2a9d970641
Uninstall application proxy factory before exit
...
This should help with segfaults on exit.
Fixes #3657
2018-03-05 07:39:36 +01:00
Florian Bruhin
155a1901c0
Merge branch 'keys'
2018-03-04 22:50:41 +01:00
Jimmy
6d415b6653
Greasemonkey: don't inject JS into dead frames
...
Hopefully closes #3627
This feels like fixing the symptom instead of the problem but I am not
sure how such a situation would arise. Never the less, the crash logs
clearly show that `_inject_userjs()` is being called with a deleted
frame sometimes. It is being called from a closure that gets triggered
on frame.loadFinished so I am not sure how frame could be deleted at
that time unless:
* the error message is misleading and it is actually some reference to
the object that is no longer valid
* the frame gets deleted from some other handler of loadFinished.
2018-03-03 15:10:44 +13:00
Jimmy
0adda22d3c
Greasemonkey: add a way to register scripts directly.
...
Previously to add a greasemonkey script you had to write it to the
greasemonkey data directory and call load_scripts(). Now you can just
make a new GreasemonkeyScript and pass it to add_script(), yay.
There are no users of the method yet although I could have used it while
writing the tests.
2018-03-03 15:02:43 +13:00
Jimmy
7dab8335e2
Greasemonkey: handle downloads that complete fast
...
When `@require`ing local files (with the `file://` scheme) the
greasemonkey manager was not catching the DownloadItem.finished signal
because it was being emitted before it had managed to connect.
I didn't see this happening while testing with files that should have
been in cache but I wouldn't be surprised.
I had to change the download mock to be able to give it the appearance
of asynchronicity. Now when using it one must set download.successful
appropriately before firing download.finished. I also added a list of
downloads to the stub so a test could enumerate them in case the
unit-under-test didn't have a reference to them.
2018-03-03 15:02:43 +13:00
Jimmy
87a0c2a7a7
Greasemonkey: indent source of required scripts
...
This is for the case where a script uses `@require` to pull down another
greasemonkey script. Since QWebEngineScript doesn't support `@require`
we pass scripts to it with any required ones pre-pended. To avoid
QWebEngineScript parsing the first metadata block, the one from the
required script, we indent the whole lot. Because the greasemonkey spec
says that the //==UserScript== text must start in the first column.
2018-03-03 15:02:42 +13:00
Jimmy
2307a0850f
Greasemonkey: Support greasemonkey-reload --force.
...
Added a new argument to the greasemonkey-reload command to support
also re-downloading any `@required` scripts.
2018-03-03 13:14:49 +13:00
Jimmy
b91e2e3267
Allow download manager to overwrite existing files unprompted.
...
This is to support the non-interactive use case of setting a
`FileDownloadTarget` and passing auto_remove and not caring if the target
file exists or not.
An alternative to adding the attribute to `FileDownloadTarget` and
having set_target pull it out would be to add a new param to `fetch()`
and `set_target()`. But it would only be used for one target type
anyway.
2018-03-03 13:14:49 +13:00
Jimmy
a7b74d8e83
Greasemonkey: give required scripts a readable filename.
2018-03-03 13:14:49 +13:00
Jimmy
a76c0067e1
Greasemonkey: Add support for the @require rule.
...
The greasemonkey spec states that user scripts should be able to put the URL
of a javascript source as the value of an `@require` key and expect to have
that script available in its scope. This commit supports deferring a user
script from being available until it's required scripts are downloaded,
downloading the scripts and prepending them onto the userscripts code before
placing it all in an iffe.
TODO:
* should I be saving the scripts somewhere else? Maybe the cache dir?
The are just going to data/greasemonkey/requires/ atm.
2018-03-03 13:14:49 +13:00
Florian Bruhin
6fc560fc78
Rewrite comment
2018-03-02 06:31:23 +01:00
Jay Kamat
a2b5bf0b73
Clear old search results on webkit
...
Fixes an issue with #3626
2018-03-01 16:15:38 -05:00
Markus Ongyerth
f7bcdfc818
Add --pygment argument to view-source
...
The --pygment argument allows to use the pygment version of view-source
over the qtwebengine internal one.
This version is slightly different in what's processed before the site
is generated, so some javascript created texts can be available.
2018-02-28 16:53:28 +01:00
Florian Bruhin
8ea6cf352b
Remove unneeded version check
...
The option isn't going to magically change as the config system prevents that.
2018-02-28 08:08:47 +01:00
Florian Bruhin
824825e67d
Make sure we only show dictionary warnings once
...
After 3956f81e73
where this was made a function,
the warning was shown twice, causing AppVeyor to fail.
2018-02-28 08:01:11 +01:00
Florian Bruhin
72e30cc12c
Fix following hints
2018-02-27 09:47:06 +01:00
Florian Bruhin
ac4fd7c563
Add KeyInfo.to_event()
2018-02-27 08:20:06 +01:00
Florian Bruhin
de3b4adfd8
Don't force-follow hints when typing chars
2018-02-26 20:48:49 +01:00
Florian Bruhin
79a337767a
Initial work at making :fake-key work
2018-02-26 09:13:44 +01:00
Florian Bruhin
353753c03c
Merge remote-tracking branch 'origin/pr/3620'
2018-02-26 07:26:24 +01:00
Florian Bruhin
de0aa32c11
Merge remote-tracking branch 'origin/pr/3626'
2018-02-26 07:20:34 +01:00
Jay Kamat
76bf35cbdd
Add qtbug60673 markers to relevant tests
2018-02-25 19:00:15 -05:00
Jay Kamat
7a8fa5f46e
Implement deduplication of searches on webkit
2018-02-25 18:40:16 -05:00
Florian Bruhin
321d5c5d20
Merge branch 'master' into keys
2018-02-25 21:25:12 +01:00
Florian Bruhin
52b5492c6a
Merge branch 'per-url'
2018-02-25 19:44:51 +01:00
Florian Bruhin
4c147b77c1
Add a test for the error page workaround
2018-02-25 16:35:02 +01:00
Florian Bruhin
a32d74e983
Fix lint
2018-02-25 16:08:15 +01:00
Florian Bruhin
97e00ba4b5
Only reload after setting changes when needed
...
Apparently, things work fine with Type.link_clicked even if we don't emit
predicted_navigation there...
2018-02-25 15:17:03 +01:00
Florian Bruhin
eade305965
Add a predicted_navigation signal
...
This is emitted when we know that we're going to visit some URL, but Qt doesn't
know yet. This way, we can change the settings early, and since we know which
settings have actually changed, prevent a change needing a reload in
_on_navigation_request.
2018-02-25 15:04:04 +01:00
Florian Bruhin
65a62b67a5
Go back to using tab.openurl on config changes
...
This seems to work most reliably at the moment...
2018-02-25 14:45:30 +01:00
Florian Bruhin
638e880604
Improve workaround for missing error pages
2018-02-25 14:45:30 +01:00
Florian Bruhin
bfb3a6594f
Try using tab.reload() on setting changes instead
2018-02-25 14:45:19 +01:00
Florian Bruhin
08bc55995b
First attempt at reloading pages after setting changes
2018-02-25 14:45:09 +01:00
Jay Kamat
4602afe770
Add a webengine duplicate search test
2018-02-23 18:13:20 -05:00
Jay Kamat
f926e7b850
Emulate webkit duplicate search behavior on webengine
2018-02-23 18:06:21 -05:00
Florian Bruhin
2c96446bb9
Track which settings changed for a URL
...
This is currently only used so only changed settings are logged, but will used
for more in the next commit.
2018-02-23 18:11:33 +01:00
Florian Bruhin
75b65e2f11
Simplify attribute handling in Web(Kit|Engine)Settings
...
Let's just have lists in _ATTRIBUTES for WebEngineSettings as well, that allows
us to share some more code.
2018-02-23 17:59:12 +01:00
Florian Bruhin
fc6a0dbe64
Show a simple error page on loading errors without JS
...
We can't tell what exactly the error is, but it's surely better than nothing.
2018-02-23 17:29:17 +01:00
Florian Bruhin
3956f81e73
Refactor websettings
...
This refactors the whole web(kit|engine|) settings mess a bit so there's a
Web(Kit|Engine)Settings object for (non-static) settings set on a
QWeb(Engine)Settings object in Qt. Everything else is set on module-level a bit
less declaratively.
The whole inheritance mess is gone, and we can now also construct a
Web(Kit|Engine)Settings object for a given tab.
Fixes #2701
2018-02-23 09:51:28 +01:00
Jay Kamat
2ffb1604d3
Convert search to blue selection when entering caret mode
2018-02-21 10:01:27 -05:00
Florian Bruhin
8b09003bd1
Merge remote-tracking branch 'origin/pr/3592'
2018-02-21 10:13:26 +01:00
Florian Bruhin
5fbd488fdf
Only change settings for main-frame navigations
2018-02-20 22:45:29 +01:00
Florian Bruhin
f2bba2e4fa
Fix navigation handling
2018-02-20 12:30:41 +01:00
Florian Bruhin
8b666d2d2e
Try to update settings in acceptNavigationRequest
...
This still doesn't seem to update them early enough?
2018-02-19 22:08:42 +01:00
Florian Bruhin
14a69d9047
Fix lint
2018-02-19 22:07:53 +01:00
Florian Bruhin
7c1fb1d215
Refactor acceptNavigationRequest handling to use signals
2018-02-19 22:07:53 +01:00
Florian Bruhin
74a7676111
Fix issues with per-domain proof-of-concept
2018-02-19 22:07:53 +01:00
Florian Bruhin
5e50824042
Broken per-URL proof-of-concept
2018-02-19 22:07:53 +01:00
bttner
e169e2165d
Refactor TabbedBrowser from inheritance to composition
2018-02-19 14:29:05 +01:00
Jay Kamat
6eeacfe82b
Fix caret being cleared when leaving any mode
2018-02-13 09:27:15 -05:00
Florian Bruhin
9bf5ff1583
Merge remote-tracking branch 'origin/pr/3584'
2018-02-13 09:43:44 +01:00
Florian Bruhin
0e87c46849
Remove unused win_id argument
2018-02-13 09:43:21 +01:00
Florian Bruhin
47451aa495
Open qute://tabs with :buffer
2018-02-12 23:00:26 +01:00
Florian Bruhin
9f163d90e1
Merge remote-tracking branch 'origin/pr/3450'
2018-02-12 22:54:43 +01:00
Simon Doppler
ca199b0d3d
Use separate variable to make pylint happy
2018-02-12 22:51:36 +01:00
Simon Doppler
0b047e3e10
Handle url with trailing slash and without
2018-02-12 22:48:41 +01:00
Simon Doppler
9a0c113f8a
Fix pylint line-too-long error
2018-02-12 22:25:21 +01:00
Simon Doppler
572257921d
Use QUrl().toDisplayString() instead of url()
2018-02-12 16:12:15 +01:00
Simon Doppler
417200fa70
Use QUrl instead of str to compare
2018-02-12 16:06:17 +01:00
Simon Doppler
d6912be223
Update import order
2018-02-12 16:04:48 +01:00
Simon Doppler
0caa5d04d3
Use tabs directly
...
also ignore tabs page url in list
2018-02-12 15:50:56 +01:00
Simon Doppler
71d33a47b3
Remove useless intermediary variables
2018-02-12 15:20:41 +01:00
Simon Doppler
ad50a7bfd2
Move import to external ressources
2018-02-12 15:20:06 +01:00
Marc Jauvin
68b12e6e9f
add missing lines
2018-02-12 07:31:02 -05:00
Marc Jauvin
0a9c0a1385
on_load_finished() signal handler for scroll-pos
...
remove get_page()
2018-02-12 07:16:01 -05:00
Marc Jauvin
a0e028a851
Update tab scroll position when finished loading.
...
Resolves #3322
2018-02-11 22:32:03 -05:00
Ryan Roden-Corrent
4a8b23380c
Trigger save on bookmark-add --toggle.
...
The toggle option was failing to fire the changed signal when it removed
a bookmark. This means the bookmark file would not be marked as dirty,
and would not be saved on exit/autosave (unless another change was
made).
2018-02-11 16:33:00 -05:00
Florian Bruhin
3170e35b31
Simplify QtWebKit scheme handlers
2018-02-11 17:14:41 +01:00
Florian Bruhin
c112290664
Make QtNetwork download manager great^H^H^H^Hlobal again
...
We originally made it per-window in b502280c06
for
issue #228 , but that was back when we still needed window IDs for stuff like
message.info.
Nowadays, there's no reason for it to be per-window anymore. The rest of the
download code can deal with one global download manager (because QtWebEngine has
one), and apart from QNAM code which wasn't used here anyways (as tab_id=None)
there was nothing using the window ID anymore.
Also see #3456 which was the original motivation for this change.
2018-02-11 16:15:29 +01:00
Florian Bruhin
e10940100d
Improve/regenerate docs
2018-02-11 11:17:37 +01:00
Florian Bruhin
9c4564fd70
Merge remote-tracking branch 'origin/pr/3581'
2018-02-11 11:16:20 +01:00
Florian Bruhin
ab768d6f6a
Merge remote-tracking branch 'origin/pr/3567'
2018-02-11 11:11:41 +01:00
Florian Bruhin
bba1eb0d76
Add missing QUrl.RemovePassword
2018-02-11 10:45:08 +01:00
Florian Bruhin
d306f81130
Merge remote-tracking branch 'origin/pr/3525'
2018-02-11 10:44:27 +01:00
Florian Bruhin
007aa8ab8d
Add some newlines
2018-02-11 10:35:46 +01:00
Florian Bruhin
772f0025f1
Clean up netrc support
2018-02-11 10:29:02 +01:00
Marc Jauvin
e6749dcf9f
[count] overrides win_id for tab-give cmd
...
- Resolves #3548
2018-02-10 10:13:07 -05:00
Marc Jauvin
e8cc74f499
Merge branch 'master' into issue#2785
2018-02-10 08:17:47 -05:00
Florian Bruhin
c7133a662c
Merge remote-tracking branch 'origin/pr/3577'
2018-02-10 11:40:49 +01:00
Florian Bruhin
995e563352
Update docs
2018-02-10 10:36:58 +01:00
Florian Bruhin
92bc61d08d
Merge remote-tracking branch 'origin/pr/3563'
2018-02-10 10:19:52 +01:00
Marc Jauvin
c6ad23f921
address all mentionned issues except for file://
...
- re-encode url using QUrl.RemovePassword | QUrl.FullyEncoded
- improve readability for clipboard / primary selection code block
2018-02-10 00:38:27 -05:00
Marc Jauvin
d88a13598a
syntax improvements and use real class attributes
2018-02-09 17:14:40 -05:00
Florian Bruhin
30994b1154
Merge remote-tracking branch 'origin/pr/3555'
2018-02-09 22:48:25 +01:00
Florian Bruhin
207107082d
Merge commit '74759fe04c0fa1d465cb36d3f8b00d6ebd9ef49d'
2018-02-09 22:31:34 +01:00
Florian Bruhin
16a3bece34
Add missing import
2018-02-09 22:28:14 +01:00
Florian Bruhin
1ea1c1ac78
Merge remote-tracking branch 'origin/pr/3549'
2018-02-09 22:27:31 +01:00
Florian Bruhin
3a5baa1956
Merge remote-tracking branch 'origin/pr/3554'
2018-02-09 22:22:18 +01:00
Marc Jauvin
74759fe04c
add missing decorator to _on_proc_finished
2018-02-09 15:33:02 -05:00
Marc Jauvin
9f49ac8e59
revert "fix shorten line" from origin/master
2018-02-09 15:25:20 -05:00
Marc Jauvin
a3ce03e0bd
address requested changes
...
- syntax cleanup
- use attr.ib when declaring class attributes
- remove unnecessary comments
- code simplification
2018-02-09 10:39:02 -05:00
Marc Jauvin
fecb551c5e
shorten lines
2018-02-09 10:39:02 -05:00
Marc Jauvin
21fc848839
document code a bit more
2018-02-09 10:39:02 -05:00
Marc Jauvin
eb7e114e5f
add propery to save tab input mode
2018-02-09 10:39:02 -05:00
Florian Bruhin
37a9691e29
Only focus qutebrowser again after editing finished
...
See #3431 , #3432
2018-02-07 23:14:16 +01:00
Florian Bruhin
3306247ae5
Merge branch 'editor-watch'
2018-02-07 22:31:49 +01:00
Florian Bruhin
01ccbc679d
Fix lint
2018-02-07 22:26:32 +01:00
George Edward Bulmer
9128afa01d
Move pastebin_version() to version.py
...
This also fixes the introduced cyclic dependencies
2018-02-07 19:03:05 +00:00
George Edward Bulmer
f45d572677
Some style fixes in PR #3480 's review
2018-02-07 17:28:57 +00:00
Bryan Kok
1d568a5cf4
Add feature to pastebin version string
...
Added a --paste flag to the :version command and a JS button with corresponding qutescheme URL in the Version debug page to enable pastebinning version.
2018-02-07 17:28:57 +00:00
Florian Bruhin
054b92bbe8
Support retrying downloads with Qt 5.10
...
Fixes #2787
2018-02-07 11:19:41 +01:00
Florian Bruhin
5fd3943ebc
Make callback mandatory for tab.selection()
2018-02-06 23:33:37 +01:00
Florian Bruhin
ce8d15d2b0
Simplify selection handling and remove QUTE_SELECTED_HTML
...
It was broken at least since caret support was introduced and it was only
available for QtWebKit anyways, so let's just drop it. This also makes the tab
API a bit simpler.
2018-02-06 22:48:00 +01:00
Florian Bruhin
16375f20d5
Always use JavaScript to get selection
...
It looks like getting the selection via the widget has issues even with Qt 5.10.
On Windows, we always get wrong results.
On Linux, it seems to be flaky. I first thought this was because of a race
between JavaScript setting the selection and Qt getting it, as now we don't use
JS to get the selection anymore, so it's possible that we get it before the
older JS code finished running. However, even calling selectedText() from a JS
callback didn't seem to help...
Since has_selection also is flawed and it taking a callback would make code more
complex as well, let's just assume there is a selection if the text is not
empty. In fact, that is exactly what QtWebEngine does for hasSelection anyways!
Fixes #3523
2018-02-06 21:58:31 +01:00
George Edward Bulmer
5ceecc2b04
Add docstring for new argument
2018-02-06 18:53:45 +00:00
George Edward Bulmer
9c47128799
Use provided methods instead of protected members
2018-02-06 18:25:15 +00:00
George Edward Bulmer
0893e3a038
Fix boolean variable name
2018-02-06 17:35:24 +00:00
George Edward Bulmer
26810e02c1
Add a way to view source in editor
2018-02-06 17:22:59 +00:00
Florian Bruhin
6f028e9ad0
Update copyright years
2018-02-05 12:19:50 +01:00
Florian Bruhin
c8de4675db
Various spelling fixes
2018-02-04 21:30:59 +01:00
Jay Kamat
0ebde6f2e9
Delete QWebEngineDownloadItem objects when wrapper object is deleted
2018-02-04 13:41:23 -05:00
Ryan Roden-Corrent
833df95485
Only detect save for open-editor and config-edit.
...
Scope down the new trigger-on-save behavior to only open-editor and
config-edit. Other uses of the editor such as edit-url and edit-command
will behave as before.
2018-02-03 19:57:47 -05:00
Marc Jauvin
989e60b01f
Revert "fix line length"
...
This reverts commit def2920a35
.
2018-02-03 19:10:19 -05:00
Jay Kamat
d7a436568c
Add a new --no-last flag to :tab-focus
...
--no-last prevents going to the last focused tab if a new tab does not
need to be focused.
2018-02-03 14:31:44 -05:00
Marc Jauvin
132095c98c
only open the tab for output once the job has finished running
2018-01-31 18:05:23 -05:00
Marc Jauvin
def2920a35
fix line length
2018-01-31 18:05:14 -05:00
Florian Bruhin
79935e048c
Break long line
2018-01-31 22:35:03 +01:00
Marc Jauvin
b55ae02eda
document proxy environment variable for system proxy
2018-01-30 09:48:52 -05:00
Marc Jauvin
1a2ab0ffe7
add back rl-yank key binding; use alt-y for prompt-yank.
2018-01-28 10:28:11 -05:00
Florian Bruhin
d01a0b1d64
Fix :bookmark-add with no URL
2018-01-28 13:05:49 +01:00
Ryan Roden-Corrent
a940de3717
Rename editing_finished to file_updated.
...
ExternalEditor now fires an event on save rather than on exit, so the
signal name should be updated to match the behavior.
2018-01-27 15:03:18 -05:00
Florian Bruhin
24cc54a574
Simplify initializing of AbstractTab subclasses
...
If we already pass the tab object, no need to pass the window ID separately.
2018-01-26 09:47:26 +01:00
Florian Bruhin
677e188894
Update docs
2018-01-26 09:37:35 +01:00
Florian Bruhin
125b3c1de9
Merge remote-tracking branch 'origin/pr/3521'
2018-01-26 09:25:50 +01:00
Marc Jauvin
d2287b7a2e
move backend specific code out of AbstractTab into respective backend
...
classes.
2018-01-25 22:38:25 -05:00
Marc Jauvin
ddcc960aa5
url arg was a string
2018-01-25 22:01:18 -05:00
Marc Jauvin
88ff0c0425
url_str -> urlstr: urlstr used accross the codebase, more consistent
2018-01-25 18:01:43 -05:00
Marc Jauvin
520b473350
modify Question.yank_text to Question.url
...
error out when question.url is None
add url to yesno prompts
add default binding in prompt mode (ctrl-y)
2018-01-25 17:48:45 -05:00
Marc Jauvin
bb8bc7ea3c
fix test related to view-source
...
remove pygment title
remove view-source from history
2018-01-25 15:17:03 -05:00
Marc Jauvin
eb888cc8d7
fix latest change requests
2018-01-25 13:35:23 -05:00
Florian Bruhin
40df5baa83
Merge remote-tracking branch 'origin/pr/3515'
2018-01-25 09:04:44 +01:00
Florian Bruhin
54e9edfd60
Merge remote-tracking branch 'origin/pr/3515'
2018-01-25 09:02:20 +01:00
Marc Jauvin
d77c9ae009
Add prompt-yank command
...
add yank_text property to utils.usertypes.Question class
Resolves #2591
2018-01-24 18:53:06 -05:00
Marc Jauvin
d7c51f7fc4
implement requested changes for PR #3521 .
2018-01-24 18:04:05 -05:00
Daniel Hahler
4f04c776c1
fixup! fixup! incdec_number: add support for port
2018-01-24 22:22:00 +01:00
Florian Bruhin
caca3614f8
Merge remote-tracking branch 'origin/pr/3443'
2018-01-24 20:36:15 +01:00
Marc Jauvin
2e912eeadf
move backend dependent code to AbstractAction respective classes
2018-01-23 23:30:22 -05:00
Marc Jauvin
83515628a8
fix line indentation warning
2018-01-23 10:11:34 -05:00
Marc Jauvin
56e6864159
Inject qutebrowser's JS files at DocumentReady
...
Use WebEngine's view-source: scheme for "view-source" command.
Also add missing URL when viewing source for WebKit.
Resolves #3490
Resolves #2395
Resolves #2948
2018-01-23 10:03:04 -05:00
Daniel Hahler
6a40cbf160
incdec_number: add support for port
2018-01-22 21:26:46 +01:00
Simon Doppler
02396cb455
Remove useless function
2018-01-22 16:12:45 +01:00
Simon Doppler
f11d7ab489
Check if the window still exists
2018-01-22 16:11:59 +01:00
Simon Doppler
ab9f17b053
Use default value for dictionary item in tabs handler
2018-01-22 16:08:30 +01:00
Florian Bruhin
748de85ba2
Fix crash when getting signals for closed tabs
...
Fixes #3498
2018-01-20 18:50:17 +01:00
Florian Bruhin
1f5cbf21a3
Merge remote-tracking branch 'origin/pr/3348'
2018-01-20 18:28:14 +01:00
Jimmy
aebc1a7d48
Greasemonkey: don't complain about an unset run-at
...
Apparently is is not an unusual situation to leave it unset and rely on
the default. Logging a warning about this could be unnecerasily
confusing for users.
I'm leaving the log message in there if it is set to something weird
like `window-load` or `document-complete` which scriptish may support.
2018-01-20 13:40:53 +13:00
Jimmy
d5d22783ea
Greasemonkey: optimize pattern matching a little
...
Moving `QUrl.toString()` out of the `_match()` function which is called
for every pattern in every stript seems to make it ~40% faster.
2018-01-20 13:40:53 +13:00
Jimmy
971b413991
Greasemonkey: make *clude regexes case insensitive
...
Sometimes I don't read specs so good.
2018-01-20 13:40:47 +13:00
Jimmy
b2f95339ce
Greasemonkey: support regexes in @include and @exclude.
...
Like the spec says, if a value for the @include or @exclude rules starts
and ends with a '/' it should be parsed as a regular expression.
Technically a ECMAScript syntax regular expression, but I am not sure of
the differences and I assume they are far fewer than the similarities.
One that I did see mentioned was that javascript RegExp doesn't support
unicode. Although it apparently does support a 'u' flag now.
Note that code will only be ran for QtWebkit and QWebEngine < 5.8
we rely on the builtin support for metadata it QWebEngine for most
things greasemonkey related. Sadly it seems that they missed the regex
requirement too. I've opened a ticket to track that https://bugreports.qt.io/browse/QTBUG-65484
2018-01-20 13:39:19 +13:00
Artur Shaikhullin
22d77fadd7
Eliminate caret blinking
2018-01-19 22:40:47 +06:00
Artur Shaikhullin
4fde8ff204
Add separate function in js to set current platform
2018-01-19 22:14:01 +06:00
Marc Jauvin
4a4a6549d0
use a temporary attribute of the class to prevent the loop; tested to work in both backends
2018-01-19 09:34:45 -05:00
Marc Jauvin
9e258a490e
might as well use the same loop prevention mechanism for both backends
2018-01-19 06:59:40 -05:00
Marc Jauvin
a2ca59b822
add netrc support for webengine. resolves #2785 .
2018-01-18 18:06:47 -05:00
Florian Bruhin
380021e818
Merge remote-tracking branch 'origin/pr/3484'
2018-01-18 07:54:42 +01:00
Marc Jauvin
72c97ca846
sort modes, "normal" mode first
2018-01-17 14:25:07 -05:00
Marc Jauvin
5db4493667
@The-Compiler requested changes addressed.
2018-01-17 10:11:32 -05:00
Florian Bruhin
b3ebcfd394
Merge remote-tracking branch 'origin/pr/3482'
2018-01-17 15:53:47 +01:00
Florian Bruhin
923785c781
Merge remote-tracking branch 'origin/pr/3467'
2018-01-17 14:41:45 +01:00
Marc Jauvin
fb0a418d0a
use url even if we do not need it
2018-01-15 16:03:22 -05:00
Marc Jauvin
9b473093b1
silence pylint warning
2018-01-15 15:45:29 -05:00
Nemanja Nedeljkovic
8d8566a5ab
Merge branch 'master' of github.com:qutebrowser/qutebrowser into angular-hints
2018-01-13 23:18:39 +01:00
Marc Jauvin
a2cdb2e4db
Merge branch 'patch-issue#24' of https://github.com/mjauvin/qutebrowser into patch-issue#24
2018-01-13 15:55:05 -05:00
Marc Jauvin
48b6c160f5
improve styling as suggested by @jgkamat
2018-01-13 15:52:49 -05:00
Christian Helbling
cd20c32973
simplify more
2018-01-13 10:48:13 +01:00
Christian Helbling
141d020ede
import debug is not needed anymore
2018-01-13 10:47:58 +01:00
Marc Jauvin
4848182204
code cleanup
...
- move qute_bindings block AFTER qute_settings block
- remove unnecessary variable declaration
2018-01-13 01:39:05 -05:00
Marc Jauvin
1e8694f3cc
remove unused module
2018-01-12 17:35:04 -05:00
Marc Jauvin
4ae33deebd
add handler for qute://bindings
2018-01-12 17:24:20 -05:00
Christian Helbling
559059d244
simplify code - state_before_fullscreen seems not to be needed anymore
2018-01-12 11:21:55 +01:00
Christian Helbling
699abef159
fix regression of #2778 which reappeared with qt 5.10 in combination with up-to-date KDE
...
this should also avoid an unneccessary KDE maximize animation when exiting fullscreen into maximized
2018-01-12 10:54:05 +01:00
Florian Bruhin
6b9edefb05
Merge remote-tracking branch 'origin/pr/3432'
2018-01-10 09:39:08 +01:00
Florian Bruhin
0518a03b1e
Merge remote-tracking branch 'origin/pr/3423'
2018-01-10 09:38:07 +01:00
Simon Doppler
dea0aa9f7c
Add tabs page
2018-01-08 18:01:42 +01:00
Nemanja Nedeljkovic
5f3ee66775
Code style improvement and documentation
2018-01-07 12:06:36 +01:00
Nemanja Nedeljkovic
957d5b3f02
Add more angular1 selectors
2018-01-07 11:58:02 +01:00
Nemanja Nedeljković
555f43c854
Add ng-click for hinting to Angular 1.x links
2018-01-06 19:18:17 +01:00
Artur Shaikhullin
c4e50369e7
Enable caret only when mode is 'caret'
2018-01-06 22:43:39 +06:00
Artur Shaikhullin
dc8c919c30
Fix pylint warnings
2018-01-05 22:44:07 +06:00
Artur Shaikhullin
b6662fd243
Use inner functions for callbacks
2018-01-05 18:35:15 +06:00
Jay Kamat
3d508be9ff
Clear unpinned tabs before prompting user with :tab-only
2018-01-04 18:34:40 -08:00
Artur Shaikhullin
695f734142
Extract js call method
2017-12-30 23:46:04 +06:00
Artur Shaikhullin
6dc3108747
Get OS name using python
2017-12-30 23:35:12 +06:00
Artur Shaikhullin
3b836d3483
Fix lint warnings
2017-12-29 17:56:16 +06:00
Florian Bruhin
705767bcfb
fixme
2017-12-29 01:43:47 +01:00
Artur Shaik
5605d3cd8e
Merge branch 'master' into webengine_caret
2017-12-28 20:43:31 +06:00
Artur Shaikhullin
63658d3a1e
Catch userscript exception and show error message
2017-12-28 20:40:37 +06:00
Artur Shaikhullin
a01566ed15
Fix loosed variable
2017-12-28 19:17:25 +06:00
RyanJenkins
9cb25e0c76
Raise browser window after editor closes regardless of outcome of
...
inserting text and avoid calling QApplication.instance().alert() in this
scenario.
2017-12-26 20:19:39 -08:00
RyanJenkins
d9b00acdc6
Return focus to qutebrowser when external editor finishes.
2017-12-23 23:59:02 -08:00
Ryan Farley
46f6336e6e
and add back needed connection
2017-12-22 12:47:38 -06:00
Ryan Farley
1d0b91475d
remove broken connection
2017-12-22 12:45:37 -06:00
Ryan Farley
252fbf651f
add back blank line for D204
2017-12-22 11:47:13 -06:00
Ryan Farley
f90342741a
comma spacing
2017-12-22 11:41:07 -06:00
Ryan Farley
feb327e80e
fix style issues, better names, less indirection
...
Added spaces to comments, use python naming conventions, remove
_load_progress_fake as unnecessary, rename _on_load_*_fake to
_on_load_*_workaround (for less confusion), and use qtutils rather than
QT_VERSION_STR
2017-12-22 11:32:31 -06:00
seebye
125af531cb
database qute://back
2017-12-22 15:44:42 +01:00
Ryan Farley
fa10b76ce8
remove extraneous loadStarted connection
...
Copying and pasting without thinking might lead to redundancy.
2017-12-22 01:27:35 -06:00