npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-external-extension

v0.0.3

Published

a cordova plugin, a JS version of open external URL, open mobile QQ temporary chat UI, open App Store

Downloads

4

Readme

cordova-plugin-external-extension

前言:

  1. 写这个插件的初衷是因为在项目中需要在我们的app中通过QQ号打开手机QQ并进入临时聊天界面,相当于一个QQ客服的功能。
  2. 前前后后试过很多种方法,H5上直接打开QQ的URL为"mqq://im/chat?chat_type=wpa&uin="+qqNum+"&version=1&src_type=web"。直接使用a href=url只能把qq号写死才行,在js中用window.open(url)的方式,android和iOS10以下的设备没问题可以打开。iOS10的设备通过设置URL Schemes的方式 可以打开手机QQ,但此时iOS10以下的设备会报错打不开手机QQ。
  3. 所以最后选择写插件的方式来实现这个功能,因为app内需要有跳转到App Store的功能,又扩展了一个使用手机默认浏览器打开URL的方法。

功能说明

  1. openURL:使用手机默认浏览器打开URL,例如iOS上用Safari打开"https://www.baidu.com";
  2. openMobileQQChat:打开手机QQ聊天页面;
  3. 打开APP Store(仅限iOS):openURL("your app download url in APP Store");
  4. 当然也可用来打开android app的下载地址。

支持平台

  1. android
  2. iOS

安装

在线安装

cordova plugin add cordova-plugin-external-extension

cordova plugin add https://github.com/hhjjj1010/cordova-plugin-external-extension.git

本地安装

下载插件到本地

cordova plugin add /your/local/path


使用 API

  1. 打开手机QQ聊天页面 cordova.plugins.externalExtension.openMobileQQChat(qqNum);
  2. 使用手机默认浏览器打开URL cordova.plugins.externalExtension.openURL("https://www.baidu.com");
  3. 打开App Store(仅限iOS) cordova.plugins.externalExtension.openURL("your app downlaod url in App Store");
  4. 打开android app的下载地址 cordova.plugins.externalExtension.openURL("your app downlaod url in android market");