Skip to content
This repository has been archived by the owner on Feb 12, 2019. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cubiq/add-to-homescreen
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: santeriv/add-to-homescreen
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

There isn’t anything to compare.

cubiq:master and santeriv:master are entirely different commit histories.

Showing with 5 additions and 3 deletions.
  1. +2 −1 README.md
  2. +3 −2 src/add2home.js
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ Add to Home Screen Floating Layer

The script places a floating balloon to your mobile website inviting the user to add your app to the home screen. This is compatible with iPhone/4/iPod-touch and iPad, iOS >= 3.1.1.

Version: 1.0.6 - [Official homepage](http://cubiq.org/add-to-home-screen) - [Video](http://vimeo.com/19090537)
Version: 1.0.7 - [Official homepage](http://cubiq.org/add-to-home-screen) - [Video](http://vimeo.com/19090537)

## Usage
Include the script and the stylesheet in your page HEAD. That's all. Look at the examples for advanced features. Documentation on [cubiq.org](http://cubiq.org/add-to-home-screen).
@@ -29,6 +29,7 @@ The script auto-detects the user's locale and shows the message in the appropria
- Portuguese [pt_pt]: Para instalar esta aplicação no seu %device, prima o '%icon' e depois o 'Adicionar ao ecrã principal'. (thanks to [@maboa](http://twitter.com/#!/maboa))
- Russian [ru_ru]: Установите это веб-приложение на ваш %device: нажмите '%icon', затем 'Добавить в «Домой»'. (thanks to [@myfreeweb](http://twitter.com/#!/myfreeweb))
- Swedish [sv_se]: Lägg till denna webbapplikation på din %device: tryck på '%icon' och därefter 'Lägg till på hemskärmen'. (thanks to [@fransrosen](http://twitter.com/#!/fransrosen))
- Thai [th_th]: ติดตั้งเว็บแอพฯ นี้บน %device ของคุณ: แตะ %icon และ เพิ่มที่หน้าจอโฮม (thanks to [@maxart](http://twitter.com/#!/maxart))
- Tukish [tr_tr]: %device için bu uygulamayı kurduktan sonra %icon simgesine dokunarak Ev Ekranına Ekleyin. (thanks to [@fatihacet](http://twitter.com/#!/fatihacet))
- Chinese simplified [zh_cn]: 您可以将此应用程式安装到您的 %device 上。请按 %icon 然后点选<strong>添加至主屏幕</strong>。 (thanks to Macro Yau)
- Chinese traditional [zh_tw]: 您可以將此應用程式安裝到您的 %device 上。請按 %icon 然後點選<strong>加入主畫面螢幕</strong>。 (thanks to Macro Yau)
5 changes: 3 additions & 2 deletions src/add2home.js
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
* Released under MIT license
* http://cubiq.org/dropbox/mit-license.txt
*
* Version 1.0.6 - Last updated: 2011.05.19
* Version 1.0.7 - Last updated: 2011.05.24
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
@@ -57,6 +57,7 @@ var nav = navigator,
pt_pt: 'Para instalar esta aplicação no seu %device, prima o %icon e depois o <strong>Adicionar ao ecrã principal</strong>.',
ru_ru: 'Установите это веб-приложение на ваш %device: нажмите %icon, затем <strong>Добавить в «Домой»</strong>.',
sv_se: 'Lägg till denna webbapplikation på din %device: tryck på %icon och därefter <strong>Lägg till på hemskärmen</strong>.',
th_th: 'ติดตั้งเว็บแอพฯ นี้บน %device ของคุณ: แตะ %icon และ <strong>เพิ่มที่หน้าจอโฮม</strong>',
tr_tr: '%device için bu uygulamayı kurduktan sonra %icon simgesine dokunarak <strong>Ev Ekranına Ekle</strong>yin.',
zh_cn: '您可以将此应用程式安装到您的 %device 上。请按 %icon 然后点选<strong>添加至主屏幕</strong>。',
zh_tw: '您可以將此應用程式安裝到您的 %device 上。請按 %icon 然後點選<strong>加入主畫面螢幕</strong>。'
@@ -125,7 +126,7 @@ function ready () {
}

div.className = (isIPad ? 'ipad' : 'iphone') + (touchIcon ? ' wide' : '');
div.innerHTML = touchIcon + options.message.replace('%device', platform).replace('%icon', OSVersion >= 4.2 ? '<span class="share"></span>' : '<span class="plus">+</span>') + (options.arrow ? '<span class="arrow"></span>' : '') + '<span class="close">×</span>';
div.innerHTML = touchIcon + options.message.replace('%device', platform).replace('%icon', OSVersion >= 4.2 ? '<span class="share"></span>' : '<span class="plus">+</span>') + (options.arrow ? '<span class="arrow"></span>' : '') + '<span class="close">\u00D7</span>';

document.body.appendChild(div);
el = div;