Commit Graph

406 Commits

Author SHA1 Message Date
Quentin Rameau f5be376ccc Fix synchronization issue with atoms
Be sure to sync after setting an atom.
Sync too before reading one.
2017-05-12 00:30:51 +02:00
Quentin Rameau 5e2216c414 There's no need to call geturi() again in loadchanged
Also call the variable “uri” instead of “title” which was ambiguous
regarding what it is.
2017-05-12 00:30:45 +02:00
Quentin Rameau 4a1876eb80 Add config option for smooth scrolling activation 2017-05-11 15:33:42 +02:00
Quentin Rameau 93a3e4cda0 Add config option for Java activation 2017-05-11 15:27:27 +02:00
Quentin Rameau 298e688933 Add config option for setting default charset.
This will be used for pages with no specified charset.
2017-05-11 15:23:22 +02:00
Quentin Rameau 745a319baf Improve parameters handling
There's no need to reload all parameters each time a new url is loaded,
instead set only custom parameters and restore those to defaults when
needed.
2017-05-11 09:22:43 +02:00
Quentin Rameau d984d12de7 Simplify usage()
There's no real need for using the real executable call name, especially
with basename requiring special care.
2017-05-04 10:29:02 +02:00
Quentin Rameau 2901145301 Simplify version message 2017-05-04 10:27:07 +02:00
Ivan Tham e23d5c1c45 Use Ctrl-t for showcert instead of Ctrl-x 2017-05-02 17:20:11 +02:00
Quentin Rameau 0df9f79d95 Fix forgotten options in surf.1 2017-05-01 01:08:27 +02:00
Hiltjo Posthuma edddfbc14a setcert: check uri before adding a certificate
Also directly check for https scheme, we won't need a certificate for
others.
2017-04-30 11:39:15 +02:00
Hiltjo Posthuma 21d81a71cc fix mini typo 2017-04-30 00:10:11 +02:00
Quentin Rameau d66904675d Add a flag for custom certificates
I don't think a keybinding would be useful here because we can't
remove a custom certificate which is alread set anyway.
I'll add it if somebody convince me of it's usefulness.
2017-04-29 17:59:08 +02:00
Quentin Rameau 7823ab6fc0 Move xid printing option from -x to -w 2017-04-29 17:59:08 +02:00
Quentin Rameau 9eda6f5dd5 Add a keybinding to show current TLS certificate 2017-04-29 17:59:07 +02:00
Quentin Rameau 1dc3cd513a Display an error message and certificate on tls error 2017-04-29 16:34:48 +02:00
Quentin Rameau db7922f173 Free temporary certificate in setcert 2017-04-29 14:34:02 +02:00
Quentin Rameau 0d1e670ac3 Do not build SiteSpecific file when regex is invalid 2017-04-28 13:09:39 +02:00
Quentin Rameau 3c2c0a6525 Add support for using custom certificates per url 2017-04-28 12:58:36 +02:00
Quentin Rameau eb32dd6eca Avoid using global name stylefile in setstyle() 2017-04-27 15:41:16 +02:00
Quentin Rameau d0e3c69e59 Change site styles structure for a more generic one 2017-04-27 15:02:40 +02:00
Quentin Rameau 5c52733984 Fix 27cec48 Add a flag/keybinding for strict TLS
Forgot to add changes in main(), usage() and newwindow() too.
2017-04-23 18:31:32 +02:00
Quentin Rameau 2940d2bd07 Fix a981959 Move -t stylefile flag to -C stylefile
Forgot to modify usage() and newwindow() too.
2017-04-23 18:28:06 +02:00
Quentin Rameau 4b752834d8 Fix possible oob access of cmd in newwindow()
Thanks to tarug0 for spotting this!
2017-04-23 18:27:43 +02:00
Quentin Rameau ac837f43b9 Bump year in program 2017-04-20 00:10:46 +02:00
Quentin Rameau 27cec48408 Add a flag and toggle keybinding for strict TLS 2017-04-20 00:10:45 +02:00
Quentin Rameau a981959124 Move -t stylefile flag to -C stylefile 2017-04-20 00:09:01 +02:00
Quentin Rameau ee854bb095 Rename SSL instances to TLS 2017-04-19 17:45:20 +02:00
Quentin Rameau 0247e91b00 Set strict ssl by default and handle insecure content
Non-https content in https pages is now handled separately from https
connection establishment.
2017-04-19 17:41:23 +02:00
Quentin Rameau 2355c20e92 Add a configure option for default window size 2017-04-19 19:10:21 +02:00
Quentin Rameau 7e02344a61 Install Atoms before initializing gtk
There a race condition in gtkplug/socket which is raised when setting
Atoms.
Use this workaround until
https://bugzilla.gnome.org/show_bug.cgi?id=778680 is fixed.
2017-03-22 17:20:36 +01:00
Quentin Rameau 37e43501d8 Fix font-size setting parameter value type in newview 2017-03-06 11:00:04 +01:00
Quentin Rameau da5290a41a Add support for loading Webkit extensions 2016-09-22 10:21:31 +02:00
Charles Lehner c64c368d86 Reload on SIGHUP
ratiueratuie rstiure tiurest aruite rautie rautier tiue rtaruit ratiuera
This patch makes surf reload its pages when it receives a SIGHUP signal.
This makes it easier for shell scripts to trigger surf to reload.

I'm aware of using xdotool to trigger ctrl+r keypresses for reloading
but I wasn't able to get that to work in a general way. [1]

I'm sending this here in case surf maintainers and users would like to
include this in core - if not I will submit it to the wiki.

Regards,
Charles

[1] http://surf.suckless.org/files/autorefresh

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-07-08 15:02:42 +02:00
Quentin Rameau 4c41d363b7 Add a few configuration options
“enable-accelerated-2d-canvas”
“media-playback-requires-user-gesture”
“enable-site-specific-quirks”

Lookup those at
https://webkitgtk.org/reference/webkit2gtk/stable/WebKitSettings.html
2016-07-05 17:32:44 +02:00
Quentin Rameau 5a02d3e500 Fix GdkDisplay assignment in setup()
Init GTK before trying to get the default display.
2016-07-05 13:35:44 +02:00
Quentin Rameau f9714ab838 Get rid of getkbdevice
The GTK guys nicely took in account our request and pushed in a
convenience function to get default keyboard device.
2016-07-05 13:01:56 +02:00
Christoph Lohmann 8682a4dffb Fixing the last patch to the surf style. 2016-07-05 13:01:56 +02:00
Dmitry Bogatov cee8f0186c Check $HOME and home dir of $USER before getpwuid()->pw_dir
getpwnam(3) recommends to use $HOME instead of getpwuid()->pw_dir,
as it allows users to point programs to a different path.

Using getpwuid() also breaks namespaces-related use cases,
like `unshare -r`.

Patch was submitted by Dmitry Bogatov on the Debian bug tracker:
https://bugs.debian.org/825397

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-07-05 13:01:56 +02:00
Quentin Rameau 3530d18d8e Fix url parsing in load() 2016-07-05 13:01:56 +02:00
Quentin Rameau 7ca9421a69 Apply domain parameters each time url is changed
Urls are only changed at load (initial requested one), or while
redirected. When the page is committed, url is already final.
2016-07-05 13:01:56 +02:00
Quentin Rameau 1206b2c587 Fix inspector toggling
Always get the inspector object, and let the user eventually close it
even if it's disabled for the current page.
2016-07-05 13:01:56 +02:00
Quentin Rameau c8fdd4d583 Rectify how parameters are handled in setparameter()
Access parameters through given Arg parameter instead of accessing
global parameters.
2016-07-05 13:01:56 +02:00
Quentin Rameau 6e019362c5 Fix parameter initialization and assignment 2016-07-05 13:01:56 +02:00
Quentin Rameau 75e3fe5b95 Adapting the whole surf structure to new settings 2016-07-05 13:01:56 +02:00
Quentin Rameau 2aa1c38aed Introduce new data structure for handling settings 2016-07-05 13:01:56 +02:00
Quentin Rameau af7522006b Get rid of JavaScript for scrolling in views
This is still a hack, until WebKitGTK gives us a more practical and
stable way to do that. Manipulating directly the DOM inside a
webextension is a pain and only usable with unstable API atm.
2016-03-02 14:46:14 +01:00
Quentin Rameau 934705c420 Fix title handling
Don't forget to always set the title to the current uri, this way it's
up to date when there is no title on the page (ie for local file
exploration).
Thanks to pickfire for reporting the issue.
2015-12-01 12:31:42 +01:00
Quentin Rameau ee04671220 Fix clickexternplayer(), no need to test the target again 2015-11-24 23:18:06 +01:00
Quentin Rameau c069b76f1b Fix user agent command-line parameter
Thanks to yui for seeing that!
2015-11-23 22:13:32 +01:00