Pastelets are web pages that generate Javascript bookmarklets primarily intended for Mobile Safari on iOS (iPhone/iPad/iPod Touch). Each generated bookmarklet pastes its specified string into a text field.
The purpose is to make it quick and easy to complete web forms on iOS with Mobile Safari, without reliance on autocomplete.
The bookmarklet generators are available as:
web/desktop/index.html- desktop version that pastes into 1st field (or asks successively).web/___- iOS optimized (with brief name) that pastes into 1st field (or asks successively). NOTE: This file isgzipcompressed.web/email- iOS optimized to paste an email into the first Email/Login field on a page. NOTE: This file isgzipcompressed.web/email.url- standalone bookmarklet version. Entire email pastelet generator HTML form as a base64 encoded bookmarklet for offline use.web/tel- iOS optimized to paste a phone number into the first telephone field on a page NOTE: This file isgzipcompressed.web/tel.url- standalone bookmarklet version. Entire telephone pastelet generator HTML form as a base64 encoded bookmarklet for offline use.
Copy the appropriate bookmarklet generator(s) to a web server.
Each page includes usage instructions. Visit the appropriate bookmarklet generator page.
The easiest way to use them is visiting the hosted versions:
- Web/Desktop version http://mmind.me/iphone/
- iOS General purpose version http://mmind.me/___
- iOS Email/Login optimized version http://mmind.me/email
- iOS Telephone field optimized version http://mmind.me/tel
Bookmarklet versions of two forms are also available. Visit one of the links
below. Then copy the displayed contents of the page (data:text/html...)
and create a new bookmark with the clipboard contents as the address/location.
Web browser or Mobile Safari from iOS 3.3 or higher
MIT License - http://opensource.org/licenses/mit-license.php
Pastelets
Copyright (c) 2008-2020 Tom King mobilemind@pobox.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The /web directory has the final, optimized HTML/CSS/JavaScript and their
shared HTML5 manifest file. The HTML, CSS, and manifest files are deflate
compressed. The JavaScript is "uglified", but not compressed.
For deployment "pastelets" likely requires web server configuration (e.g.,
.htaccess on Apache servers).
Required configuration items include:
-
The MIME type for the HTML 5 manifest file. For Apache that looks like:
AddType text/cache-manifest cache manifest
-
With files named '___' or 'email' or 'tel':
a. Force to be MIME type
text/htmlb. Set encoding to zip
c. Set cache options to enable caching for a few minutes at least.
For Apache this looks like:
<FilesMatch "^(___|email|tel)$"> ForceType "text/html; charset=utf-8" Header set Content-Encoding "deflate" Header set Cache-Control "max-age=361, public, proxy-revalidate" </FilesMatch>
- The file name
___is used to clarify editing of the bookmarklet and serve as a short filename - Ideally, the files will be in a subdirectory of the web server root with a short name.
Finally, note that the app will work fine with the manifest directive removed, and/or the HTML file renamed. If the manifest is used the file should be served via HTTPS for best results. If the HTML file is renamed, the instructions in the HTML should probably be changed.
The project builds with node, npm and grunt. It should build on
most platforms that support node. It also requires a local command line
version of zopfli; for zopfli installation information see
https://github.com/mathiasbynens/grunt-zopfli or
https://github.com/google/zopfli.
To clone and build the project:
git clone https://github.com/mobilemind/pastelets
cd pastelets
npm install
gruntThe project has been built successfully on macOS 10.7-11.0