pinboard-elinks

Check-in [54472f67b0]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Bug fix: Redirect back to original page after bookmarking
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256: 54472f67b080006ba46e4ff38b136fd9a987d506b79cf14acf4099955a8cf810
User & Date: atomicules@lavabit.com 2012-12-16 23:11:45
Context
2012-12-20
00:04
Add delete "button" to bookmark page, works via Pinboard API

- Can't use normal delete/destroy since requires posting form data and
as far as I know that can only be done via Javascript. However, the
API works great just as a get request. Therefore make a delete link
that works via an API call
- Since this is immediately destructive only put the delete link on the
individual bookmark page, not when browsing through a list of
bookmarks
- Requires API token to be entered into file
- Also use some file level variables to avoid repetition and
duplication.
- Clear up naming. Was a mix of camel case and underscores check-in: 68a1601284 user: atomicules@lavabit.com tags: master, trunk

2012-12-16
23:11
Bug fix: Redirect back to original page after bookmarking check-in: 54472f67b0 user: atomicules@lavabit.com tags: master, trunk
13:29
Move todo comments to README check-in: c50d4e18be user: atomicules@lavabit.com tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pinboard.lua.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--Pinboard tools for ELinks
--source from your ~/.elinks/hooks.lua file with `dofile("pinboard.lua")`

--ALT+p to save a bookmark. Brings up an XDialog, first row is to enter a description, second row is for tags
--ALT+l to read later. 
--Reformats the mobile site to be better for ELinks


function addto_pinboard (description, tags)
	pinboardBase = 'https://pinboard.in/add?'
	url = current_url ()
	title = current_title ()
	docURL = pinboardBase..'url='..escape (url)..'&title='..escape (title)..'&description='..escape (description)..'&tags='..escape (tags)..' ','Pinboard','toolbar=no,width=700,height=350';
    return docURL
end
	bind_key ("main", "Alt-p",
		function () xdialog("<Description>", "<Tags>",
			function (description, tags)
				return "goto_url",
				addto_pinboard (description, tags) 












|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--Pinboard tools for ELinks
--source from your ~/.elinks/hooks.lua file with `dofile("pinboard.lua")`

--ALT+p to save a bookmark. Brings up an XDialog, first row is to enter a description, second row is for tags
--ALT+l to read later. 
--Reformats the mobile site to be better for ELinks


function addto_pinboard (description, tags)
	pinboardBase = 'https://pinboard.in/add?'
	url = current_url ()
	title = current_title ()
	docURL = pinboardBase..'url='..escape (url)..'&title='..escape (title)..'&description='..escape (description)..'&tags='..escape (tags)..'&next='..escape (url)..' ','Pinboard','toolbar=no,width=700,height=350';
    return docURL
end
	bind_key ("main", "Alt-p",
		function () xdialog("<Description>", "<Tags>",
			function (description, tags)
				return "goto_url",
				addto_pinboard (description, tags)