You are not logged in.

#1 2013-04-17 08:13:06

z1lt0id
Member
Registered: 2012-09-20
Posts: 169

DWB - userscript plugin doesn't work

I've been trying to get the userscript plugin in to work and I have installed via dwbem.  Every other plugin I installed works except this one.  Here is the output.

DWB EXTENSION: extension adblock_subscriptions: Successfully loaded and initialized.
DWB EXTENSION: extension googledocs: Successfully loaded and initialized.
DWB EXTENSION: extension downloadhandler: Successfully loaded and initialized.
DWB EXTENSION: extension formfiller: Successfully loaded and initialized.
DWB EXTENSION: extension googlebookmarks: Successfully loaded and initialized.
DWB EXTENSION ERROR: extension userscripts: Initialization failed.
STACK: [value] [value] [anonymous] [[native code]

What could be the issue?  I've tried uninstalling it and reinstalling it, but I'm just not having any luck.

Offline

#2 2013-04-17 09:13:46

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

Re: DWB - userscript plugin doesn't work

You must either set script paths in the userscript configuration (you can do it with dwbem -E userscripts) or copy userscripts to ~/.config/dwb/greasemonkey, if the userscripts extension doesn't find any userscripts it returns an error.

Offline

#3 2013-04-17 10:32:18

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

Re: DWB - userscript plugin doesn't work

portix wrote:

copy userscripts to ~/.config/dwb/greasemonkey

Did you mean ~/.config/dwb/userscripts?

Offline

#4 2013-04-17 10:52:06

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

Re: DWB - userscript plugin doesn't work

No, the names are a bit misleading, i will change that with the next release. ~/.config/dwb/userscripts is for shell scripts and scripts that use the javascript api, the userscripts extension can be used for greasemonkey scripts, the extension loads all scripts either in ~/.config/dwb/greasemonkey or ~/.config/dwb/scripts (which is deprecated), additionally it loads all scripts from the scripts array that can be set with dwbem -E userscripts.

Edit: I think the confusing point is that scripts that use the javascript api and greasemonkey scripts are both written in javascript, but they are completely different. greasemonkey scripts are injected into websites to manipulate the website, scripts that use the javascript api can be used to control dwb, both execution contexts are separated.

Last edited by portix (2013-04-17 10:55:21)

Offline

#5 2013-04-17 11:08:06

z1lt0id
Member
Registered: 2012-09-20
Posts: 169

Re: DWB - userscript plugin doesn't work

Thanks for clearing this up.  I was quietly confused what directory I was suppose to put the scripts into.  The man said XDG_HOME$/dwb which I found a little odd considering the userscripts directory was in .config/dwb/userscripts.

Offline

Board footer

Powered by FluxBB