You are not logged in.

#801 2012-05-07 11:19:07

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

Re: dwb - a webkit web browser

Army wrote:

edit: Found a little bug, I hope it's ok if I provide this little patch here

Thanks, fixed in 1267.

Offline

#802 2012-05-08 08:06:56

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

Re: dwb - a webkit web browser

portix wrote:

I created a new option 'close-tab-focus-policy' with possible values left, right, leftmost and rightmost.

Am I just stupid or does this option not work with the latest hg snapshot?

Last edited by Army (2012-05-08 08:08:44)

Offline

#803 2012-05-08 11:11:59

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

Re: dwb - a webkit web browser

Army wrote:
portix wrote:

I created a new option 'close-tab-focus-policy' with possible values left, right, leftmost and rightmost.

Am I just stupid or does this option not work with the latest hg snapshot?

No, i'm the stupid, i did a mistake when merging 2 revisions, the option is back again.

Offline

#804 2012-05-09 07:21:36

pyknite
Member
Registered: 2010-03-03
Posts: 166

Re: dwb - a webkit web browser

Hi,

First, thanks for this browser... It's a very nice piece of software \o/

I'm having an issue... When I'm browsing a website with flash content, it doesn't load automaticaly.

It show the area used by the flash player with a puzzle piece in the center and I have to click on it to load the video.
It's really annoying when you are playing a playlist on youtube (also it didn't load the next video automaticaly).

But anyway, as I said before, very good work... It's now my default browser!

Cheers.

Offline

#805 2012-05-09 07:53:18

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

Re: dwb - a webkit web browser

Type 'Ss' to get to the settings and disable the plugin-blocker.

Offline

#806 2012-05-09 08:25:54

pyknite
Member
Registered: 2010-03-03
Posts: 166

Re: dwb - a webkit web browser

Army wrote:

Type 'Ss' to get to the settings and disable the plugin-blocker.

Ohhh thanks, I totally missed this option sad

Offline

#807 2012-05-09 08:35:36

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

Re: dwb - a webkit web browser

It is also possible to enable/disable it on domain basis pressing 'ph'.

Offline

#808 2012-05-09 15:27:25

wolfcore
Member
From: California
Registered: 2012-03-06
Posts: 137

Re: dwb - a webkit web browser

Just started playing with dwb last night and I wanted to say that it is great! smile

Offline

#809 2012-05-09 18:12:27

clockworkrat
Member
Registered: 2011-11-13
Posts: 12

Re: dwb - a webkit web browser

I just wanted to say thank you for making dwb. It's by far my preferred browser. Keep up the good work!

Offline

#810 2012-05-09 18:25:08

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

Re: dwb - a webkit web browser

I keep discovering things which don't work in e.g. surf, for example in facebook to remove the chat windows with the escape key. I thought this was due to a webkit bug or on facebook's site, but it works with dwb. Facebook isn't important, I use irssi + bitlbee for the chat, but it's good to know that dwb works really well.

One question thou portix, the 'ph' command you mentioned earlier, this is supposed to tell dwb to not show the clickable element on selected websites, right? (if both options 'enable-plugins' and 'plugin-blocker' are enabled)

Because I tried to use this command differently and it didn't work like I expected. What I did was to disable those two options and then enable plugins for specific sites with 'ph'. But it seems like when I disable the 'enable-plugins' option, they are just completely disabled.

(This post isn't supposed to be a feature request or anything, I just want to point out that this might be not so intuitive to others too, maybe it would be better to remove the 'plugin-blocker' option and give 3 options to 'enable-plugins':
1. no, 2. yes, but clickable, 3. yes
or something like that, makes more sense to me)

Ok, so it turned out to become a feature request... big_smile

Offline

#811 2012-05-09 18:43:01

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

Re: dwb - a webkit web browser

@Army: I think your suggestion is reasonable but to be honest, i don't even know if i keep the clickable plugin blocker in dwb. There is a bug in the plugin blocker with flashplayer > 11.2, it sometimes doesn't block flash content and i wasn't able to fix it yet.
If the plugin blocker gets removed 'ph' might  toggle 'enable-plugins', if not i might implement your suggestion.

Offline

#812 2012-05-09 19:18:47

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

Re: dwb - a webkit web browser

That's ok too. I think losing this clickable area wouldn't be a very big loss, in fact it's better sometimes to just not see anything of flash content.

And there's something else which would be improved with 'ph' toggling 'enable-plugins': On youtube, if scripts are enabled, but plugins are disabled, you automatically get the html5 video player. The way it works in dwb right now, youtube gets the information from the browser that it's capable of loading plugins, so it wants to give you the flash player. Now it's only possible to use the html5 player to either add a '&html5=1' to the url or enable it with cookies.
This might be true for other webpages too, like vimeo etc.

My suggestion: remove the blocker and make 'ph' toggle 'enable-plugins'

Offline

#813 2012-05-09 19:40:26

jakob
Member
From: Berlin
Registered: 2005-10-27
Posts: 419

Re: dwb - a webkit web browser

I really have come to love the clickable element since it often prevents music or sounds abruptly starting to come from one of the 10 tabs just opened and it saves some bandwith, too. But as long as an “en/disable plugin” setting is available (which serves the exact same purposes), removing the clickable element functionality certainly is no loss…

Offline

#814 2012-05-12 06:52:05

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: dwb - a webkit web browser

I get a black screen when I access this: http://m.flickr.com/photos/abooow9090/6 … /lightbox/

but it renders OK in chromium. Is there any setting I need to change? Using latest of dwb-hg.

Last edited by stryder (2012-05-12 06:53:03)

Offline

#815 2012-05-12 14:04:58

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

Re: dwb - a webkit web browser

stryder wrote:

I get a black screen when I access this: http://m.flickr.com/photos/abooow9090/6 … /lightbox/

but it renders OK in chromium. Is there any setting I need to change? Using latest of dwb-hg.

I can reproduce it but it seems to be an issue with the user-agent, after setting the user-agent to an empty value which resets the user-agent string, the site loads fine. Btw. it doesn't make much sense to compare webkitgtk browsers with chrome/chromium, they don't have much in common.

Offline

#816 2012-05-12 14:19:06

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: dwb - a webkit web browser

I mentioned chromium only to show that whatever that might be needed to render the page is already in my system and so the fault must be with the browser. I also get a blank (but with headers on top and bottom) page using firefox. Thanks for testing it out. I was mostly wondering if a particular setting was the cause.

Offline

#817 2012-05-18 07:44:32

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: dwb - a webkit web browser

I found the following example code for form-filling in the dwb site:

#!/bin/bash 
# dwb: control mod1 f
 
# This script can be used to automatically fill out forms.  The data must be
# saved in a different file (CONTENT_FILE) each line specifies a form and must
# be of the form
# <url> <submit> <element_1_name> <element_1_value> <element_2_name> <element_2_value> ... 
# example: https://bbs.archlinux.org/login.php true req_username username req_password password save_pass true
 
CONTENT_FILE=${XDG_CONFIG_HOME}/dwb/data/forms

COMMAND+="exja function set_value(e, value){if(e.type==\"checkbox\"||e.type==\"radio\"){e.checked=(value.toLowerCase()!=='false'&&value!=='0');}else{e.value=value;}}"

while read; do
  read -a LINE -d $'\0' <<<"${REPLY}"
  if [[ "$DWB_URI" =~ ${LINE[0]} ]]; then 
    if [[ ${LINE[1]} = "true" ]]; then
      SUBMIT=1
    else
      SUBMIT=0
    fi
    for ((i=2; i<${#LINE[@]}; i++)); do
      NAME=${LINE[$((i++))]}
      VALUE=${LINE[$((i))]}
      COMMAND+="var ${NAME}=document.getElementsByName(\"${NAME}\")[0];set_value(${NAME},\"${VALUE}\");"
    done
    test ${SUBMIT} != 0 && COMMAND+="${NAME}.form.submit();"
  fi
done < "${CONTENT_FILE}"

printf "${COMMAND}\nclose\n"

# vim: tw=0

I copied everything into a file called formfiller.sh and placed it in ~/.config/dwb/userscripts with just a change to the name for the contents file (to form.txt).

I copied "https://bbs.archlinux.org/login.php true req_username username req_password password save_pass true" to a file called form.txt in ~/.config/dwb/data/ , switching username, password with my username and password.

I reloaded userscripts and pressed "control mod1 f" at the archlinux log in page.

I can see the status bar saying it is executing the formfiller.sh script but nothing happens. What else must I do?

Offline

#818 2012-05-18 08:47:18

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

Re: dwb - a webkit web browser

The formfiller script in the repository was deprecated, the output needs to be send to $DWB_FIFO, there is now an updated version in the repo.

Offline

#819 2012-05-18 10:41:13

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: dwb - a webkit web browser

Thanks portix. Copied over everything (made necessary change to content_file), relaunched dwb, nothing still.

Offline

#820 2012-05-18 10:55:23

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

Re: dwb - a webkit web browser

I don't know what's wrong then, it is exactly the script that i use and i'm sure it works on archlinux.org.

Offline

#821 2012-05-18 11:05:58

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: dwb - a webkit web browser

OK. I'll try to test out some simple script and hopefully figure out what is wrong.

Offline

#822 2012-05-18 11:51:33

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

Re: dwb - a webkit web browser

My bad, there seems to be a bug when a function is mapped to a shortcut, i always execute userscripts from dwb's commandline and this works for me. I'll try to fix it soon.

Offline

#823 2012-05-18 12:53:57

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

Re: dwb - a webkit web browser

@stryder: I have hacked together a formfiller script that uses the js api, you can use it if you have a recent version of dwb-hg.

#!javascript

var shortcut = "gF";

var forms = { 
  "https://bbs.archlinux.org/.*" : { req_username : "name", req_password : "password", save_pass : "true" }
};

var injectFunction = function (data) {
  var name, value;
  for (name in data) {
    value = data[name];
    var e = document.getElementsByName(name)[0];
    if(e.type=="checkbox" || e.type=="radio") 
      e.checked=(value.toLowerCase() !== 'false' && value !== '0');
    else
      e.value=value;
  }
};

function fillForm () {
  var key, r, name;
  var uri = tabs.current.uri;
  for (key in forms) {
    r = new RegExp(key);
    if (r.test(uri)) {
      var script = "(" + String(injectFunction) + ")(" + JSON.stringify(forms[key]) + ");";
      var frames = tabs.current.allFrames;
      for (var i=0; i<frames.length; i++) {
        frames[i].inject(script);
      }
      return;
    }
  }
}

bind(shortcut, fillForm);

The format for the form data as you might guess is

forms = { 
  "regular-expression-for-url1" : { form1-name1 : "form1-value1", form1-name2 : "form1-value2" }, 
  "regular-expression-for-url2" : { form2-name1 : "form2-value1", form2-name2 : "form2-value2" },
 ...
};

Offline

#824 2012-05-18 18:18:08

Shinryuu
Member
From: /dev/urandom
Registered: 2010-02-27
Posts: 339

Re: dwb - a webkit web browser

Hey, any idea why I have these black boxes in my dwb? This doesn't happen with my laptop which is x86_64 too. I have tried to delete my configurations, tried both dwb and dwb-hg etc. I wonder what's the difference in my system. Also I have tried different GTK themes but it doesn't help.

Here's the pic:
tZHNydA

Last edited by Shinryuu (2012-05-18 18:19:24)

Offline

#825 2012-05-18 18:23:52

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: dwb - a webkit web browser

portix wrote:
#!javascript

Shouldn't

//!javascript

be more appropriate?


gh · da · ds

Offline

Board footer

Powered by FluxBB