This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------------------------------------- | |
-- Auto save/apply zoom levels on a per-domain basis -- | |
-- (C) 2011 Roman Leonov <[email protected]> -- | |
-- (C) 2011 Mason Larobina <[email protected]> -- | |
-------------------------------------------------------- | |
-- Get lua environment | |
local math = require "math" | |
local tonumber = tonumber | |
local string = string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/luakit -c | |
-------------------------------------------------------------------- | |
-- 2011 (C) Mason Larobina <[email protected]> -- | |
-- Browser in under 128 lines of code? (my attempt) -- | |
-- See: http://lateral.netmanagers.com.ar/weblog/posts/BB948.html -- | |
-------------------------------------------------------------------- | |
local homepage = "http://luakit.org/" | |
-- Create the browser window |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local ready_views = setmetatable({}, { __mode = "k" }) | |
local go_next = [=[ | |
(function() { | |
var el = document.querySelector("[rel='next']"); | |
if (el) { // Wow a developer that knows what he's doing! | |
location = el.href; | |
} | |
else { // Search from the bottom of the page up for a next link. | |
var els = document.getElementsByTagName("a"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------------------------------------------------- | |
-- Simple autoscroll script for luakit (luakit.org) -- | |
-- Install instructions: -- | |
-- 1. Add to rc.lua before window spawning code. -- | |
-- 2. Or: save to $XDG_CONFIG_HOME/luakit/autoscroll.lua and -- | |
-- add `require "autoscroll"` to your rc.lua -- | |
---------------------------------------------------------------- | |
local buf, key = lousy.bind.buf, lousy.bind.key |
NewerOlder