• Stars
    star
    135
  • Rank 268,481 (Top 6 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created about 11 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Launch native apps from web page links for mobile and desktop devices

jquery.applink

Create links to native apps from mobile (or minor cases from desktop) browsers.

HTML links should have the web url as default, but you can add an alternate link using the registered app protocol to invoke apps like Facebook, Twitter, Foursquare, etc...

Example:

<a href="https://facebook.com/me" data-applink="fb://profile">My Facebook Profile</a>

Also, you can use it to share your page, like:

<a href="http://twitter.com/intent/tweet?url=<?php echo $url; ?>&amp;text=<?php echo urlencode($text); ?>" data-applink="twitter://post?url=<?php echo $url; ?>&amp;text=<?php echo urlencode($text); ?>">Share My Web in Twitter</a>

This action will try to open the Twitter mobile app, and if is not available, it will open the default share modal at browser.

You have a extended schemes list available at http://wiki.akosma.com/IPhone_URL_Schemes and http://handleopenurl.com/scheme

Plugin detects the target="_blank" tag attribute, but take care because the window will be open with javascript function window.open and can be blocked by browser.

To enable the plugin:

$(document).ready(function () {
    $('a[data-applink]').applink();
});

All options and default values:

$(document).ready(function () {
    $('a[data-applink]').applink({
        popup: 'auto', // disable/enable share popup created by plugin. If auto, only will be enabled to popupDomains domains
        popupDomains: 'twitter|facebook', // If "popup" option is auto, it will check this domains to open a domain or redirect to page
        desktop: false, // disable/enable native app check for no mobile devices
        data: 'applink' // load native links from data-XXXXXX attribute,
        timeout: 1500 // time in ms to detect app before launch HTTP link (only when is mobile and desktop is false)
    });
});

Also, if you are using this plugin to set native links to a large list, you can use the delegate function to get the best performance:

$(document).ready(function () {
    $('.links-list').applink({
        popup: 'auto', // disable/enable share popup created by plugin. If auto, only will be enabled to popupDomains domains
        popupDomains: 'twitter|facebook', // If "popup" option is auto, it will check this domains to open a domain or redirect to page
        desktop: false, // disable/enable native app check for no mobile devices
        delegate: 'a[data-applink]', // Delegate action into the parent element (default is null)
        data: 'applink' // load native links from data-XXXXXX attribute,
        timeout: 1500 // time in ms to detect app before launch HTTP link (only when is mobile and desktop is false)
    });
});

Enjoy!

More Repositories

1

laravel-Meta

HTML Meta Tags management package available for for Laravel >= 5 (Including 10)
JavaScript
187
star
2

Password-Manager

Self-hosted Password Manager based on Laravel 10 + PHP 8 + MySQL 8. Gestor de Contraseñas basado en Laravel 10 + PHP 8 + MySQL 8.
PHP
164
star
3

redsys-TPV

Controlador en PHP para pasarelas de pago (TPV) Redsys / Sermepa / Servired
PHP
60
star
4

laravel-Packer

CSS, Javascript and Images packer/processors to Laravel
JavaScript
57
star
5

GPS-Tracker

GPS Tracker platform for Sinotrack ST-90x, OsmAnd and Queclink devices built with Laravel 10 + PHP 8.1 and MySQL 8. Plataforma GPS Tracker para dispositivos Sinotrack ST-90x, OsmAnd y Queclink creada con Laravel 10 + PHP 8.1 y MySQL 8.
PHP
40
star
6

Sublime-Text-ChatGPT

A Sublime Text Plugin/Package to connect with OpenAI ChatGPT
Python
25
star
7

crypto

Plataforma multiusuario para gestión de cryptos en PHP 8.1 y Laravel 10
PHP
23
star
8

Password-Manager-Chrome

Extensión de Chrome para el Gestor de Contraseñas
JavaScript
19
star
9

laravel-database-cache

Cache Database Query results on Laravel
PHP
17
star
10

php-changes-cheatsheet

HTML
16
star
11

magento2-language-es_es

Magento 2 Spanish (Spain) language package - Paquete de idioma Español (España) para Magento 2
PHP
13
star
12

redsys-Fake

Emulador de TPV redsys remoto para pruebas de pagos
PHP
12
star
13

PHPCan

A PHP Framework as tool for world domination.
PHP
11
star
14

PHPFileNavigator

PHPfileNavigator is state-of-the-art, open source web based application to complete manage your files and folders.
PHP
11
star
15

redsys-Messages

Listado de mensajes de error y pago correcto remitidos a través de Ds_Response y Ds_ErrorCode
PHP
10
star
16

laravel-Gettext

PHP
9
star
17

Ceca-TPV

Genera los formularios para la integración de la pasarela de pago de sistemas CECA
PHP
9
star
18

disposable-email-validator

Validate emails against multiple databases with disposable email domains
PHP
8
star
19

web-deploy

Easy panel to web deploy
PHP
7
star
20

Cache

PHP Cache Interface
PHP
7
star
21

invoice-api

Laravel Backend | https://invoice.lito.com.es/ | https://invoice-demo.lito.com.es/
PHP
6
star
22

php-microoptimizations

Website with PHP code comparison
PHP
6
star
23

captcha

A new simple and easy-to-implement captcha package.
PHP
6
star
24

auto-reaver

Launch reaver against all WPA/WPS discovered networks
Shell
5
star
25

invoice-vue

Vue Frontend | https://invoice.lito.com.es/ | https://invoice-demo.lito.com.es/
JavaScript
4
star
26

Apalabro

PHP project to create an Apalabrados (Angry Words) web interface.
PHP
3
star
27

facebook-birthdays

Automate the Facebook Birthdays Wishes from your own profile
PHP
3
star
28

SkyDriveAPI

Microsoft SkyDrive PHP API
PHP
2
star
29

Laravel-Domain-Scaffolding

PHP
1
star
30

Curl

A Simple Curl Interface
PHP
1
star
31

laravel-Processor

PHP
1
star
32

Gettext

A Simple Gettext Interface
PHP
1
star
33

laravel-FormManager

PHP
1
star
34

Timer

A simple timer mark script
PHP
1
star
35

Db

DB Interface Library using PDO and Respect/Relational repository
PHP
1
star
36

laravel-SimpleRoute

PHP
1
star