You are not logged in.

#1001 2012-08-24 23:18:28

portix
Member
Registered: 2009-01-13
Posts: 757

Re: dwb - a webkit web browser

The reason why BackSpace doesn't work is that BackSpace is a hardcoded shortcut for correcting shortcuts, but i'll think about removing it, i have never used it anyway.
The issue with 'sk' is now fixed in dwb-hg.

Offline

#1002 2012-08-25 06:23:13

DexterLB
Member
Registered: 2011-06-20
Posts: 50

Re: dwb - a webkit web browser

Great browser, I think it will replace all other browsers I've used! smile


I have two minor issues:

1) on a new arch install, flash doesn't seem to work. Apparently I haven't installed some package - is there anything else except "flashplugin" to enable flash in webkit? I don't really use flash that much, but it's annoying when you stumble on a site that uses it and it doesn't work.

2) sometimes when I use a command like open(o) or quickmark(m) that requires a text entry, the textbox doesn't appear: for example, when I press o, I get "open: " in the status bar but no text box, and the next keystrokes I enter are interpreted as shortcut keys in normal mode. I can't determine if this is random or if I'm doing something to cause it, does anybody else have that problem?


I didn't quite read through the entire thread, so I'm sorry if this has been asked before.. I did run some searches, and nothing turned out.


The best solution to a problem is usually the easiest one.

Offline

#1003 2012-08-25 07:16:38

portix
Member
Registered: 2009-01-13
Posts: 757

Re: dwb - a webkit web browser

It sounds like you have the  gtk3-version installed. flash won't work with the gtk3 version because the flashplugin is linked against gtk2. There is a bug in gtk3 that textentries sometimes don't get focus, there is already a bugreport on the gnome bugtracker: https://bugzilla.gnome.org/show_bug.cgi?id=677329.

Offline

#1004 2012-08-25 15:44:54

chneukirchen
Member
Registered: 2010-02-11
Posts: 100

Re: dwb - a webkit web browser

Would it be hard to add something that saved the session more often than just on regular exit?  I always hate to lose tabs, and occasionally dwb still crashes...

Also, is there a way to get the current URL from a shell script (via fifo)?

Offline

#1005 2012-08-25 16:00:53

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: dwb - a webkit web browser

chneukirchen wrote:

Would it be hard to add something that saved the session more often than just on regular exit?  I always hate to lose tabs, and occasionally dwb still crashes...

Isn't this controlled by the "sync-files" option?

@portix, I always get false positives (at least I think that's what they are) with requestpolicy on facebook

pkhidkonipdjidjglnkfcfhnkfnlefbk
kjafndplmofcedgddaoceenkcbfankem
kincjchfokkeneeofpeefomkikfkiedl
iejbljbhhoclgfiapmomcpkpkcmihfib
lkfhadffdnjnogmgjfihlcmmjhcfchaj
afnnkheojlgkipfabekmdkngocfhegck
hkpibllecmidllaojdmkcmfnoinmejco
gpllafflnmgjjcakjloknldkndnkmcpi

next to the right positives

fbcdn.net
akamaihd.net

This is no biggie, since those entries are easy to be ignored or to be blocked entirely. I'm just wondering if there's a weakness in requestpolicy's code.

Or should I report this in the bugtracker?

Last edited by Army (2012-08-25 16:03:17)

Offline

#1006 2012-08-25 16:41:02

portix
Member
Registered: 2009-01-13
Posts: 757

Re: dwb - a webkit web browser

The sync-files option only controls history and cookies but i think i should also
add the session.

@chneukirchen: You can put bash-scripts in ~/.config/dwb/userscripts and call
them from within dwb. When the script is called the environment variable DWB_URI
will be set to the url of the focused tab. There are several other environment
variables set, they are documented in the man page.

@army: would be nice if you could create a ticket, i don't know if i can fix
this in the next days and i usually forget about bugreports reported in this
thread.

Offline

#1007 2012-08-25 17:55:36

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: dwb - a webkit web browser

Ok, done.

Just a quick question about something else: If I don't use the adblock plugin, would it be possible to compile dwb without it? Or would you say that the gain is too little to bother (I doubt that this is good english big_smile ) ?

Offline

#1008 2012-08-25 19:14:54

chneukirchen
Member
Registered: 2010-02-11
Posts: 100

Re: dwb - a webkit web browser

sync-files is good to know, thanks.

I was trying to get the current URL from an external process.

Offline

#1009 2012-08-25 19:20:45

chneukirchen
Member
Registered: 2010-02-11
Posts: 100

Re: dwb - a webkit web browser

Also, I think I found a bug, but I'm not sure it's in dwb or dwm... it only happens when I use both together.

I use mozplugger to embed mupdf to display PDF files. Reparenting works fine, and I can use the mouse to scroll, but key events are not passed to the inner window.

However, mupdf in dwb works e.g. with cwm or fvwm.

But it doesn't appear to be a dwm bug solely, because mupdf works e.g. in tabbed or Firefox in dwm.

Unfortunately, I have no idea how to debug this.

Offline

#1010 2012-08-25 19:30:12

portix
Member
Registered: 2009-01-13
Posts: 757

Re: dwb - a webkit web browser

The only advantage that you'll get is a smaller binary. There was the possibility to compile dwb without adblocking but i removed it. If you really want to compile it without adblocking, here is a patch:

diff -r 9fb2a463678e config.mk
--- a/config.mk	Sat Aug 25 10:21:34 2012 +0200
+++ b/config.mk	Sat Aug 25 21:20:35 2012 +0200
@@ -148,6 +148,11 @@
 CPPFLAGS+=-DGDK_DISABLE_DEPRECATED
 CPPFLAGS+=-DGSEAL_ENABLE
 endif
+
+ifeq (${DISABLE_ADBLOCK}, 1)
+CFLAGS += -DDISABLE_ADBLOCK
+endif
+
 CFLAGS +=-I/usr/lib/dwb/ 
 
 # LDFLAGS
diff -r 9fb2a463678e src/adblock.c
--- a/src/adblock.c	Sat Aug 25 10:21:34 2012 +0200
+++ b/src/adblock.c	Sat Aug 25 21:20:35 2012 +0200
@@ -16,6 +16,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
+#ifndef DISABLE_ADBLOCK
 #include <string.h>
 #include <JavaScriptCore/JavaScript.h>
 #include "dwb.h"
@@ -843,3 +844,4 @@
   m_init = true;
   return true;
 }/*}}}*//*}}}*/
+#endif
diff -r 9fb2a463678e src/adblock.h
--- a/src/adblock.h	Sat Aug 25 10:21:34 2012 +0200
+++ b/src/adblock.h	Sat Aug 25 21:20:35 2012 +0200
@@ -16,6 +16,8 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
+#ifndef DISABLE_ADBLOCK
+
 #ifndef ADBLOCK_H
 #define ADBLOCK_H
 
@@ -26,3 +28,4 @@
 void adblock_disconnect(GList *gl);
 
 #endif // ADBLOCK_H
+#endif
diff -r 9fb2a463678e src/config.h
--- a/src/config.h	Sat Aug 25 10:21:34 2012 +0200
+++ b/src/config.h	Sat Aug 25 21:20:35 2012 +0200
@@ -1135,10 +1135,12 @@
     SETTING_GLOBAL,  CHAR, { .p = NULL }, NULL,  { 0 }, }, 
   { { "editor",                            "External editor", },                                            
     SETTING_GLOBAL,  CHAR, { .p = "xterm -e vim dwb_uri" }, NULL,   { 0 }, }, 
+#ifndef DISABLE_ADBLOCK
   { { "adblocker",                               "Whether to block advertisements via a filterlist", },                   
     SETTING_GLOBAL,  BOOLEAN, { .b = false }, (S_Func)dwb_set_adblock,   { 0 }, }, 
   { { "adblocker-filterlist",                    "Path to a filterlist", },                   
     SETTING_GLOBAL,  CHAR, { .p = NULL }, NULL,   { 0 }, }, 
+#endif
 #ifdef WITH_LIBSOUP_2_38 
   { { "addressbar-dns-lookup",                               "Whether to perform a dns check for text typed into the address bar", },                   
     SETTING_GLOBAL | SETTING_ONINIT,  BOOLEAN, { .b = false }, (S_Func)dwb_set_dns_lookup,   { 0 }, }, 
diff -r 9fb2a463678e src/dwb.c
--- a/src/dwb.c	Sat Aug 25 10:21:34 2012 +0200
+++ b/src/dwb.c	Sat Aug 25 21:20:35 2012 +0200
@@ -43,7 +43,9 @@
 #include "js.h"
 #include "callback.h"
 #include "entry.h"
+#ifndef DISABLE_ADBLOCK
 #include "adblock.h"
+#endif
 #include "domain.h"
 #include "application.h"
 #include "scripts.h"
@@ -154,6 +156,7 @@
   return STATUS_OK;
 }/*}}}*/
 
+#ifndef DISABLE_ADBLOCK
 /* dwb_set_adblock {{{*/
 void
 dwb_set_adblock(GList *gl, WebSettings *s) {
@@ -166,6 +169,7 @@
       adblock_disconnect(l);
   }
 }/*}}}*/
+#endif
 
 /* dwb_set_cookies {{{ */
 static DwbStatus
@@ -2980,7 +2984,9 @@
   }
 
   dwb_soup_end();
+#ifndef DISABLE_ADBLOCK
   adblock_end();
+#endif
   domain_end();
 
   util_rmdir(dwb.files[FILES_CACHEDIR], true, true);
@@ -3948,7 +3954,9 @@
   dwb_init_gui();
   dwb_init_custom_keys(false);
   domain_init();
+#ifndef DISABLE_ADBLOCK
   adblock_init();
+#endif
   dwb_init_hints(NULL, NULL);
 
   dwb_soup_init();
diff -r 9fb2a463678e src/view.c
--- a/src/view.c	Sat Aug 25 10:21:34 2012 +0200
+++ b/src/view.c	Sat Aug 25 21:20:35 2012 +0200
@@ -29,7 +29,9 @@
 #include "plugins.h"
 #include "local.h"
 #include "soup.h"
+#ifndef DISABLE_ADBLOCK
 #include "adblock.h"
+#endif
 #include "js.h"
 #include "scripts.h"
 
@@ -1192,8 +1194,10 @@
 
   view_init_signals(ret);
   view_init_settings(ret);
+#ifndef DISABLE_ADBLOCK
   if (GET_BOOL("adblocker"))
     adblock_connect(ret);
+#endif
 
   dwb_update_layout();

you can compile dwb with DISABLE_ADBLOCK=1 after applying this patch. I'm not sure if i merge this patch into the default branch again.

Offline

#1011 2012-08-25 21:00:13

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: dwb - a webkit web browser

Compiling dwb without adblock was just an example. I have enough RAM now, so I won't have to do it. I'm just thinking about people with limited RAM, a group of people I belonged to not long ago. Back then I tried to optimize applications as good as possible without using Gentoo.

Offline

#1012 2012-08-26 11:11:33

portix
Member
Registered: 2009-01-13
Posts: 757

Re: dwb - a webkit web browser

Compiling dwb without adblock will not reduce RAM usage substantially. It will
only reduce the size of the binary. For me it reduced RAM usage about 50 kb
compared to dwb with adblocking compiled in but disabled adblocker, so i don't
know if it's worth the effort to make it possible to compile it without certain
features. A compromise could be to provide some features like the adblocker or
the plugin blocker as a shared library that only gets loaded if the feature is
enabled.

Offline

#1013 2012-08-26 23:31:47

portix
Member
Registered: 2009-01-13
Posts: 757

Re: dwb - a webkit web browser

chneukirchen wrote:

Would it be hard to add something that saved the session more often than just on regular exit?  I always hate to lose tabs, and occasionally dwb still crashes...

There is now a new option file-sync-interval which is the same as the prior sync-files option, sync-files now has changed it can now take the arguments 'all', 'cookies', 'history', 'session' or a combination of these values. So it is now also possible to sync the session.

Offline

#1014 2012-08-27 19:24:45

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: dwb - a webkit web browser

@portix
I've seem to spot the bug on the window flicker when downloading.

If there are enough of downloads going, the gtk labels cause the window to resize, thus causing flickering since monsterwm resizes it right back.
If I change monitor so that the monitor where the dwb is won't be updated, the dwb window gets resized so that all the GTK labels (downloads) fit it.

Offline

#1015 2012-08-30 16:53:51

chneukirchen
Member
Registered: 2010-02-11
Posts: 100

Re: dwb - a webkit web browser

chneukirchen wrote:

Also, I think I found a bug, but I'm not sure it's in dwb or dwm... it only happens when I use both together.

I use mozplugger to embed mupdf to display PDF files. Reparenting works fine, and I can use the mouse to scroll, but key events are not passed to the inner window.

However, mupdf in dwb works e.g. with cwm or fvwm.

But it doesn't appear to be a dwm bug solely, because mupdf works e.g. in tabbed or Firefox in dwm.

Unfortunately, I have no idea how to debug this.

This appears to be a bug in Webkit, more analysis at http://lists.suckless.org/dev/1208/12209.html

Offline

#1016 2012-09-02 19:18:37

Mr_Kartoffelsalat
Member
Registered: 2012-04-17
Posts: 29

Re: dwb - a webkit web browser

Thank you very much for this browser, portix !
I was looking for an alternative to Firefox which I found in dwb.  smile

Offline

#1017 2012-09-06 20:50:17

eduardo.eae
Member
From: Reconquista - Argentina
Registered: 2010-01-24
Posts: 68

Re: dwb - a webkit web browser

A couple of days ago. Like a week or less, dwb stopped saving cookies. Does anything related to cookies has changed?
My cookies related settings are:
cookies-accept-policy: always
cookies-store-policy: session

I granted some sites permission on ~/.config/dwb/default/cookies.allow
That always allowed those sites to store persistent cookies, or it used to.

***

Never mind. There was an option in ~/.config/dwb/settings "cookies=false" that doesn't appear in the settings page. Just changed it to "true" and its working again.

Thanks @portix for your continuous work on this awesome browser.

Last edited by eduardo.eae (2012-09-06 21:00:32)

Offline

#1018 2012-09-06 21:05:20

portix
Member
Registered: 2009-01-13
Posts: 757

Re: dwb - a webkit web browser

The cookie code hasn't changed since january. The sync-files setting has changed, maybe this is the reason for your problem, but i'm not sure. I haven't had any issues but i'll test it again. The old sync-files setting is now called file-sync-interval, you could try to set the sync-files setting explicitly.

Offline

#1019 2012-09-07 16:32:12

maattd
Member
From: Toulouse, France
Registered: 2008-08-23
Posts: 56
Website

Re: dwb - a webkit web browser

First of all, thanks for this amazing browser smile
I have a small suggestion about adblocking though : would it be possible to simply set a folder ( .dwb/ablock/ for example) where you can put any number of lists, and
those would be automatically loaded and merged by dwb ?

Offline

#1020 2012-09-07 17:04:17

portix
Member
Registered: 2009-01-13
Posts: 757

Re: dwb - a webkit web browser

Yeah, that needed only a small change, if you check out the latest revision
dwb will read all files from 'adblocker-filterlist' if it is a directory.

I already thought about providing a small extension for online subscriptions.

Offline

#1021 2012-09-07 19:59:36

maattd
Member
From: Toulouse, France
Registered: 2008-08-23
Posts: 56
Website

Re: dwb - a webkit web browser

portix wrote:

Yeah, that needed only a small change, if you check out the latest revision
dwb will read all files from 'adblocker-filterlist' if it is a directory.

I already thought about providing a small extension for online subscriptions.

Excellent, I'm using it right now !
(I have some rules which are not activated because of the "popup" option not supported - my list is easylist + french extensions)
Congrats for this browser

Offline

#1022 2012-09-07 23:43:15

hellomynameisphil
Member
From: /home/phil/Vancouver
Registered: 2009-10-02
Posts: 257
Website

Re: dwb - a webkit web browser

Sorry if this has been asked before, but is there any way to hide the tab bar if there is only one tab open?

Offline

#1023 2012-09-08 16:27:34

portix
Member
Registered: 2009-01-13
Posts: 757

Re: dwb - a webkit web browser

hellomynameisphil wrote:

Sorry if this has been asked before, but is there any way to hide the tab bar if there is only one tab open?

There isn't a native setting for it anymore, you can try it with the following script:

#!javascript

signals.connect("closeTab", function () {
  if (tabs.length == 2) 
    execute("set widget-packing Twds");
});
signals.connect("createTab", function () {
  if (tabs.length == 2) 
    execute("set widget-packing twds");
});

Offline

#1024 2012-09-09 17:28:51

Šaran
Member
From: Bosnia
Registered: 2011-09-03
Posts: 407

Re: dwb - a webkit web browser

Hi portix.

I have noticed odd behavior with clipboard handling.
Ctrl+C anywhere in the page successfuly copies text and makes it pastable on Ctrl+V, but doing the same on e.g. current page dialog (go) will
synchronise copied text to shift+insert buffer (or whatever it's called) which is really anyoing. Can you make them work the same way?

BTW, I'm using Cloudef's loliclip as clipboard manager.
Thanks.

Offline

#1025 2012-09-11 13:09:13

bslackr
Member
Registered: 2012-01-27
Posts: 131

Re: dwb - a webkit web browser

I have my cookies set to session on youtube, but I would like to enable html5 for it as well. I found an extension for chrome that does this exact thing, and was curious how I would modify this to work in dwb. All it does is check if the html5 cookie is set, and if not sets it. Ideally it would be run on startup, or maybe whenever youtube was visited. Here is what happens on chromium:

<html>
  <script>
    function set_youtube_cookie(cookie) {
        if(cookie == null) {
            chrome.cookies.set({name: "PREF", value: "f2=40000000", url: "http://youtube.com/", domain: "youtube.com"});
        }
    }

    chrome.cookies.get({name: "PREF", url: "http://youtube.com/"}, set_youtube_cookie);
  </script>
</html>

Unfortunately my javascript skills are non existant, and I don't know how I would access the dwb cookies from it. Any help would be appreciated.

Offline

Board footer

Powered by FluxBB