Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mtrunkat/bookmarklet
Simple javascript bookmarklet browser icon
https://github.com/mtrunkat/bookmarklet
bookmarklet browser javascript
Last synced: 6 days ago
JSON representation
Simple javascript bookmarklet browser icon
- Host: GitHub
- URL: https://github.com/mtrunkat/bookmarklet
- Owner: mtrunkat
- License: gpl-2.0
- Created: 2013-06-06T11:02:24.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2020-01-02T20:59:16.000Z (almost 5 years ago)
- Last Synced: 2024-10-12T05:24:26.471Z (about 1 month ago)
- Topics: bookmarklet, browser, javascript
- Language: HTML
- Homepage:
- Size: 703 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Bookmarklet
Code is based on the Bookmarklet module https://drupal.org/project/bookmarklet for Drupal by Benjamin Doherty. It's completely rewritten to work without dependencies like jQuery and jQuery UI. It also creates just plain iframe inside of the parent site to minimalize the probability of CSS conflicts.
## Overview
This bookmarklet can be simply used at any site. Users can drag and drop the Bookmarklet button to his browser bar.
![alt text](./img/img.jpg)
When he clicks at the button, an iframe is created inside of the DOM of the current site pointing to the given URL. Url, title and images from the current site are passed to the iframe as GET parameters.
![alt text](./img/img2.jpg)
## Configuration
All you have to do is to configure the properties of settings object:
| Property | Type | Description |
| ------------- |:-------------:|-------------|
| url | string | full url to be opened in iframe |
| url_js | string | full url of bookmarklet.js file |
| css_iframe | string | css of iframe |
| css_overlay | string | css of page url |
| image | boolean | if we want to look for images contained in site |
| image_width | integer | minimal width of images |
| image_height | integer | minimal height of images |And here is the full code of the bookmarklet button (for details see example.html):
```html
Drag and drop this button to your browser bar.
```The bookmarklet can be closed from iframe via following call (works in modern browsers only):
window.parent.postMessage('close', '*');