You are not logged in.

#801 2012-03-21 11:21:28

bratmaxe
Member
From: Germany
Registered: 2010-11-07
Posts: 71

Re: luakit browser framework (almost with jQuery!)

I think you have to add a * to apply it globally like this:

/* Fonts and Dimensions */
* {font-size: 16pt !important;}

If this still does not work, there might be something wrong with the syntax in your globals.lua.

Edit: The correct syntax would be something like this:

domain_props = { 
    ["all"] = {
        enable_scripts              = true,
        enable_plugins              = true,
        enable_private_browsing     = false,
        user_stylesheet_uri         = "file://" .. luakit.data_dir .. "/styles/custom.css",
    },
}

Last edited by bratmaxe (2012-03-21 11:37:41)

Offline

#802 2012-03-21 11:58:49

anti-destin
Member
Registered: 2009-02-14
Posts: 234

Re: luakit browser framework (almost with jQuery!)

thanks. the asterisk made no difference.

i have:

domain_props = {
    ["all"] = {
        ["enable-scripts"]          = true,
        ["enable-plugins"]          = true,
        ["enable-private-browsing"] = true,
        ["user-stylesheet-uri"]     = "file://" .. luakit.data_dir .. "/styles/custom.css",
    },
    ["youtube.com"] = {
        ["enable-scripts"] = true,
        ["enable-plugins"] = true,
    },
    ["bbs.archlinux.org"] = {
        ["user-stylesheet-uri"]     = "file://" .. luakit.data_dir .. "/styles/dark.css",
        ["enable-private-browsing"] = true,
    },
}

Offline

#803 2012-03-21 12:08:35

bratmaxe
Member
From: Germany
Registered: 2010-11-07
Posts: 71

Re: luakit browser framework (almost with jQuery!)

The custom.css has to be in ~/.local/share/luakit/styles/
If that's the case, i have no idea why this does not work. I tested your custom.css with my domain_props which I posted above, and it works. (But i had to add the *)

Last edited by bratmaxe (2012-03-21 12:09:51)

Offline

#804 2012-03-21 12:22:16

anti-destin
Member
Registered: 2009-02-14
Posts: 234

Re: luakit browser framework (almost with jQuery!)

yes, the file is in ~/.local/share/luakit/styles, but the font size doesn't change. not sure why.

Offline

#805 2012-03-21 12:59:38

bratmaxe
Member
From: Germany
Registered: 2010-11-07
Posts: 71

Re: luakit browser framework (almost with jQuery!)

Okay I think I found the problem by testing your config. You have to replace the - with _ in your domain_props properties names. For example user_stylesheet_uri instead of user-stylesheet-uri.

Offline

#806 2012-03-21 13:19:55

anti-destin
Member
Registered: 2009-02-14
Posts: 234

Re: luakit browser framework (almost with jQuery!)

strange. i tried changing that line to match what you have, but that had no effect.

Offline

#807 2012-03-21 15:31:26

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

Re: luakit browser framework (almost with jQuery!)

Bellum wrote:

By "our" lua, I mean Arch Linux, which uses 5.1. 5.2 seems to break backwards compatibility a bit. In which case it's just a matter of either installing lua 5.1 or waiting for luakit to be ported to 5.2.

Ah, that makes sense. Thanks forr your help. I'll use dwb for now.

Offline

#808 2012-03-23 10:21:04

anti-destin
Member
Registered: 2009-02-14
Posts: 234

Re: luakit browser framework (almost with jQuery!)

anti-destin wrote:

strange. i tried changing that line to match what you have, but that had no effect.

i copied over the stock config files and tried redoing everything. now the custom css file works, but only for some pages. for example, gmail uses large fonts, but the arch linux forum does not. but this is most likely not a luakit issue now.

Offline

#809 2012-03-23 10:34:50

Draven94
Member
Registered: 2012-03-21
Posts: 11

Re: luakit browser framework (almost with jQuery!)

I am a new user and I have some questions:
- how to change the start page?
- how to change the default downlaods directory?
- how to change default search engine? (by default is google but I want to use google encrypted)
- what is the history quickmark?
Thanks.

Last edited by Draven94 (2012-03-23 10:45:13)

Offline

#810 2012-03-23 12:58:11

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: luakit browser framework (almost with jQuery!)

Er ... Draven, you'll probably quickly find that the arch community is very fast to help those who at least try to help themselves.

Most of those questions, however, show that you have not even tried any basic steps or done any research of your own.  Perhaps you'll get lucky on this thread, but I'd advise against keeping up such questions lest you get referred to the "help vampire" sites.

I will give you a direction as a freebie: read the *.lua files in ~/.config/luakit/ or put them there as pacman instructed if they aren't there yet.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#811 2012-03-23 15:09:15

Draven94
Member
Registered: 2012-03-21
Posts: 11

Re: luakit browser framework (almost with jQuery!)

Ok, I solved my questions smile

Offline

#812 2012-03-23 16:11:52

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: luakit browser framework (almost with jQuery!)

Glad to hear my worries were inflated.  Please do feel free to ask questions if/when you get stuck - but always give it a shot on your own first.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#813 2012-03-26 12:26:57

mason.larobina
Member
From: Australia
Registered: 2009-07-02
Posts: 200
Website

Re: luakit browser framework (almost with jQuery!)

At long last, luakit version 2012.03.25!

Luakit-2012.03.25 Release Notes

Enjoy folks,

As usual if you have any problems with luakit ask here or raise an issue on github and I'll get to it as soon as possible.

Offline

#814 2012-03-26 12:35:13

Draven94
Member
Registered: 2012-03-21
Posts: 11

Re: luakit browser framework (almost with jQuery!)

I have another question:
I have a login problem with a web site. Is it possible to change the user agent in global.lua? (only for this site I think that it is not possible)

Offline

#815 2012-03-26 12:36:58

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: luakit browser framework (almost with jQuery!)

mason.larobina wrote:

At long last, luakit version 2012.03.25!

I see that we still have luakit 2011.07.22-3 in the repos. Should it be marked out-of-date?

Offline

#816 2012-03-26 12:39:55

mason.larobina
Member
From: Australia
Registered: 2009-07-02
Posts: 200
Website

Re: luakit browser framework (almost with jQuery!)

karol wrote:
mason.larobina wrote:

At long last, luakit version 2012.03.25!

I see that we still have luakit 2011.07.22-3 in the repos. Should it be marked out-of-date?

Yes, just about to do that. Slowly getting there smile

Edit: and done.

Last edited by mason.larobina (2012-03-26 12:47:10)

Offline

#817 2012-03-26 12:46:55

mason.larobina
Member
From: Australia
Registered: 2009-07-02
Posts: 200
Website

Re: luakit browser framework (almost with jQuery!)

Draven94 wrote:

I have another question:
I have a login problem with a web site. Is it possible to change the user agent in global.lua? (only for this site I think that it is not possible)

It's a lot of hassle to change the useragent on a per-site basis. I'd recommend using a recent Chrome/chromium useragent.

(And to change the useragent add this somewhere after the `require "globals"` line in your rc.lua or edit globals.lua directly)

globals.useragent = "Mozilla/5.0 ..."

Offline

#818 2012-03-26 16:16:10

Draven94
Member
Registered: 2012-03-21
Posts: 11

Re: luakit browser framework (almost with jQuery!)

mason.larobina wrote:
Draven94 wrote:

I have another question:
I have a login problem with a web site. Is it possible to change the user agent in global.lua? (only for this site I think that it is not possible)

It's a lot of hassle to change the useragent on a per-site basis. I'd recommend using a recent Chrome/chromium useragent.

(And to change the useragent add this somewhere after the `require "globals"` line in your rc.lua or edit globals.lua directly)

globals.useragent = "Mozilla/5.0 ..."

Thank you, it works well smile

Offline

#819 2012-03-27 03:05:56

mahatman2
Member
From: Baton Rouge, LA, USA
Registered: 2010-03-04
Posts: 46
Website

Re: luakit browser framework (almost with jQuery!)

Hi, I've been using Luakit for a little while and it's great but I've tried to get the link hints in follow mode to be alphanumeric as per the instructions in the wiki but the files are different. There is no follow.lua anymore; there is a follow folder but I checked all files for one of the modules and it wasn't there. Anyway help would be appreciated! Thanks.


Clever Linux quote.

Offline

#820 2012-03-27 14:06:37

sonkei
Member
From: Detroit,MI
Registered: 2009-04-06
Posts: 27

Re: luakit browser framework (almost with jQuery!)

mahatman2 wrote:

Hi, I've been using Luakit for a little while and it's great but I've tried to get the link hints in follow mode to be alphanumeric as per the instructions in the wiki but the files are different. There is no follow.lua anymore; there is a follow folder but I checked all files for one of the modules and it wasn't there. Anyway help would be appreciated! Thanks.

pretty sure it's in the rc.lua

-- To use a custom character set for the follow hint labels un-comment and
-- modify the following:
--local s = follow.styles
--follow.style = s.sort(s.reverse(s.charset("asdfqwerzxcv"))) -- I'm a lefty

Offline

#821 2012-03-27 17:49:37

bootleg
Member
Registered: 2010-12-08
Posts: 38

Re: luakit browser framework (almost with jQuery!)

bootleg wrote:
webview.init_funcs.magned_hook = function (view, w)
    view:add_signal("navigation-request", function (v, uri)
        if string.match(uri, "^magnet:") then
            local cmd = string.format("%s %q", "mktor", uri)
            luakit.spawn(cmd)
            return false
        end
    end)
end

This doesn't seem to work when luakit isn't attach to a terminal (it must be something with mktor I think), I didn't find a better solution than to use tmux like this instead:

local cmd = string.format("tmux new -d \"mktor '%s'\"", uri)

Last edited by bootleg (2012-03-27 17:50:29)

Offline

#822 2012-03-30 01:48:14

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: luakit browser framework (almost with jQuery!)

Mason, great work on luakit, but I recently found a stumbling block.  I hope you, or someone else here, can provide some information.

A couple sites I have to use regularly have content linked via a javascript function that looks like the following

javascript:__doPostBack(...)

The dots are, of course, parameters and are different in each instance.

As I only barely dabble in Javascript I'm not familiar with this function.  But while all other javascript seems to work - and javascript test pages give me positive results - these __doPostBack links do nothing.  In other browsers (eg chromium) the link opens a pdf file.  I'm at a loss of how to proceed.

Any help would be appreciated.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#823 2012-03-31 14:27:36

Asmir
Member
From: BiH
Registered: 2011-10-06
Posts: 67

Re: luakit browser framework (almost with jQuery!)

Hi,

Can someone tell me how to configure luakit so that every tab is oppened in a new window, because I would like my window manager to handle tabbing.
Thanks.

Offline

#824 2012-03-31 18:24:30

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

Re: luakit browser framework (almost with jQuery!)

Well, I have the complete opposite. This is in my rc.lua

-- always open new window as a new tab
webview.init_funcs.window_decision = function (view, w)
    view:add_signal("new-window-decision", function (v, uri, reason)
        w:new_tab(uri)
        return true
    end)
end

Might be a starting point.

Offline

#825 2012-03-31 19:24:20

bootleg
Member
Registered: 2010-12-08
Posts: 38

Re: luakit browser framework (almost with jQuery!)

Yeah I think just replacing w:new_tab by window.new({uri}) can do the trick. I didn't tested though.

Offline

Board footer

Powered by FluxBB