App icon 1Writer

WebLinker

Shared by wineroses

Make a link plate from inner Web browser.

Script

// Customize this STYLE. ${url}:URL, ${title}:Title, ${clip}:Clipboard
STYLE="<div style='color:barkblue;background:#eee;border:1px solid gray;width:500px;padding:10px;border-radius:5px;'><a href='${url}' target='_blank'><img align=left src='http://capture.heartrails.com/120x120/?${url}' style='border-radius:5px;margin:1px 10px 10px 1px;box-shadow:1px 2px 3px gray;'>${title}</a><br style=clear:both;></div>\n";

url=webBrowser.getURL();
title=webBrowser.getTitle();
clip=app.getClipboard();
text=STYLE.replace(/\${url}/g,url).replace(/\${title}/g,title).replace(/\${clip}/g,clip);
editor.replaceSelection(text);