-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path$__ak_plugins_EasyBookmark.json
1 lines (1 loc) · 5.12 KB
/
$__ak_plugins_EasyBookmark.json
1
[{"text":"{\n \"tiddlers\": {\n \"$:/ak/plugins/EasyBookmark/newBookmark.js\": {\n \"text\": \"/*\\\\\\ntitle: $:/ak/plugins/EasyBookmark/newBookmark.js\\ntype: application/javascript\\nmodule-type: macro\\n\\n\\n<<newBookmark \\\"url\\\" \\\"includeScreenshot\\\" \\\"apiflash.com APIKey\\\">>\\n\\nExample to get title from google <<getDataFromUrl \\\"https://google.com\\\" \\\"yes\\\" \\\"AxZfv38193DKl\\\">>\\n\\n\\n\\\\*/\\n\\n(function(){\\n\\n\\n\\\"use strict\\\";\\n\\n\\n\\nexports.name = \\\"newBookmark\\\";\\n\\n\\nexports.params = [{name: \\\"url\\\"},{name: \\\"includeScreenshot\\\"}, {name: \\\"APIKey\\\"}];\\n\\n/*\\nRun the macro\\n*/\\n\\nexports.run = function(url, includeScreenshot, APIKey) {\\n\\n var url = encodeURI(url) || \\\"None\\\";\\n var includeScreenshot = includeScreenshot || \\\"no\\\";\\n var tiddlerTitle = \\\"None\\\";\\n var tiddlerText = \\\"None\\\";\\n var APIKey = APIKey || \\\"None\\\";\\n\\n console.log(\\\">>>>>>>>>>>>>>>>>> \\\" + APIKey + \\\"<<<<<<<<<<<<<<<<<<\\\");\\n\\n $tw.utils.httpRequest({url: \\\"http://textance.herokuapp.com/title/\\\"+url, type: \\\"POST\\\", callback: function (error,data){\\n if (error){\\n console.log(\\\"ERROR:\\\"+error);\\n }\\n tiddlerTitle = data;\\n tiddlerText = url;\\n\\n if(includeScreenshot == \\\"yes\\\"){\\n tiddlerText += \\\"<br /> <a href='\\\" + url + \\\"' target='_blank'>[img[https://api.apiflash.com/v1/urltoimage?access_key=\\\" + APIKey + \\\"&url=\\\" + url + \\\"]] </a>\\\";\\n }\\n $tw.wiki.addTiddler({title:tiddlerTitle, text:tiddlerText});\\n console.log(\\\">>>>>>>>>>>>>>>>>> \\\" + tiddlerText + \\\"<<<<<<<<<<<<<<<<<<\\\");\\n }}) \\n\\n return \\\"[[\\\"+tiddlerTitle +\\\"]]\\\";\\n};\\n\\n\\n})();\",\n \"bag\": \"default\",\n \"revision\": \"5\",\n \"type\": \"application/javascript\",\n \"title\": \"$:/ak/plugins/EasyBookmark/newBookmark.js\",\n \"tags\": \"\",\n \"module-type\": \"macro\",\n \"modified\": \"20200426104958801\",\n \"created\": \"20200425195727700\"\n },\n \"$:/ak/plugins/EasyBookmark/state/newBookmark\": {\n \"text\": \"\",\n \"bag\": \"default\",\n \"revision\": \"41\",\n \"url\": \"\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"title\": \"$:/ak/plugins/EasyBookmark/state/newBookmark\",\n \"modified\": \"20200426150735454\",\n \"includescreenshot\": \"yes\",\n \"created\": \"20200425203503662\",\n \"apikey\": \"\"\n },\n \"$:/ak/plugins/EasyBookmark/change.log\": {\n \"created\": \"20200426105656669\",\n \"text\": \"\\\"\\\"\\\"\\n''2020-04-26'': v0.0.4\\n* added URL encoding as per herokuapp.com api documentation\\n* tagged [[New Bookmark]] as $:/tags/SideBar to make it show as per Mohammad Suggestion\\n''2020-04-25'': v0.0.2 initial release\\n\\\"\\\"\\\"\",\n \"bag\": \"default\",\n \"revision\": \"4\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"title\": \"$:/ak/plugins/EasyBookmark/change.log\",\n \"modified\": \"20200426152945933\"\n },\n \"New Bookmark\": {\n \"text\": \"\\\\define new-Bookmark()\\n<<newBookmark \\\"$(extUrl)$\\\" \\\"$(includeScreenshot)$\\\" \\\"$(APIKey)$\\\">>\\n\\\\end\\n\\n<$edit-text class='tc-edit-texteditor' tiddler='$:/ak/plugins/EasyBookmark/state/newBookmark' field='url' placeholder='Bookmark URL ~include http(s)://~'/><br> \\n\\n<$checkbox tiddler='$:/ak/plugins/EasyBookmark/state/newBookmark' field=\\\"includescreenshot\\\" checked=\\\"yes\\\" unchecked=\\\"no\\\" default=\\\"yes\\\"> Include a screenshot?</$checkbox>\\n\\n<$reveal type=\\\"match\\\" state=\\\"$:/ak/plugins/EasyBookmark/state/newBookmark!!includescreenshot\\\" text=\\\"yes\\\">\\n\\n<$edit-text class='tc-edit-texteditor' tiddler='$:/ak/plugins/EasyBookmark/state/newBookmark' field='apikey' placeholder='Your apiflash.com API Key'/><br> \\n\\n</$reveal>\\n\\n\\n<$set name=\\\"extUrl\\\" value={{$:/ak/plugins/EasyBookmark/state/newBookmark!!url}} >\\n<$set name=\\\"includeScreenshot\\\" value={{$:/ak/plugins/EasyBookmark/state/newBookmark!!includescreenshot}}>\\n<$set name=\\\"APIKey\\\" value={{$:/ak/plugins/EasyBookmark/state/newBookmark!!apikey}}>\\n<$button actions=<<new-Bookmark>>>\\n<$action-setfield $tiddler='$:/ak/plugins/EasyBookmark/state/newBookmark' url='' includescreenshot='' />\\nCreate Bookmark\\n</$button>\\n</$set>\\n</$set>\\n</$set>\\n\\n\\n\",\n \"bag\": \"default\",\n \"revision\": \"1\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"title\": \"New Bookmark\",\n \"tags\": \"$:/tags/SideBar\",\n \"modified\": \"20200426105151553\",\n \"created\": \"20200425165640168\"\n }\n }\n}","bag":"default","revision":"2","version":"0.0.4","type":"application/json","title":"$:/ak/plugins/EasyBookmark","plugin-type":"plugin","name":"EasyBookmark","modified":"20200426153028245","description":"Easily Create Bookmarks","dependents":"","created":"20200425195410697"}]