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 |
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
#!/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
-------------------------------------------------------- | |
-- 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
------------------------------------------------------------------ | |
-- Auto enter insert mode when input field focused on page load -- | |
-- (C) 2011 Mason Larobina <[email protected]> -- | |
------------------------------------------------------------------ | |
local is_editable = [=[ | |
(function () { | |
var e = document.activeElement; | |
// we might get a window object if the main frame was focused | |
if (!e || !e.tagName) { |
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
---------------------------------------------------------- | |
-- :dbclean command to vacuum all open sqlite databases -- | |
-- (C) 2011 Mason Larobina <[email protected]> -- | |
---------------------------------------------------------- | |
-- Note: this needs to be required in your config before any databases | |
-- are created (i.e. before the history and cookies libs) | |
require "coroutine" | |
require "lfs" |
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
# Maintainer: J. W. Birdsong <jwbirdsong AT gmail DOT com> | |
pkgname=luakit | |
pkgver=2011.05.06 | |
pkgrel=1 | |
pkgdesc="luakit is a fast, small, webkit-gtk based browser extensible by Lua. Stable release." | |
arch=('i686' 'x86_64') | |
url="http://www.luakit.org/projects/luakit" | |
license=('GPL3') | |
depends=('libwebkit' 'luafilesystem') |
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
-------------------------------------------------------- | |
-- NoScript plugin for luakit -- | |
-- (C) 2011 Mason Larobina <[email protected]> -- | |
-------------------------------------------------------- | |
-- Get Lua environment | |
local os = require "os" | |
local tonumber = tonumber | |
local assert = assert | |
local table = table |
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
diff --git a/config/rc.lua b/config/rc.lua | |
index 839310e..88b43be 100644 | |
--- a/config/rc.lua | |
+++ b/config/rc.lua | |
@@ -130,6 +130,30 @@ require "go_input" | |
require "go_next_prev" | |
require "go_up" | |
+------------------ | |
+-- Add a clock! -- |
OlderNewer