Extensions inspire

gallery_plugin

5

Details

Author:
dongweiwei

Category:
Developer Tools

Version:
1.2.2

Users:
14

Rating:
5

Size:
444KiB

Price:
Free

Updated:
April 14, 2021

Webstore Link:
https://chrome.google.com/webstore/detail/galleryplugin/dbmepmcagijhnmbibliihhmgdnomkoek

Download

version 1.2.2  - Download ZIP file

version 1.2.0  - Download ZIP file

Description

该插件会针对节跳动公司域名( "https://*.bytecdn.cn/*", "https://*.snssdk.com/*", "https://*.byted.org/*", "https://*.pstatp.com/*")下的h5 hybrid app page inject一段脚本。h5 hybrid app page通常都是在手机application中用webview打开。webview通常会注入一些native能力(https://www.jianshu.com/p/3e25127e6f9a),页面可以通过jsbridge调用这些native能力,如果直接用chrome打开这些页面,由于chrome没有提供这些jsbridge,因此会导致h5页面在chrome上展示不正常。

为了更好的在chrome上面浏览我们的h5 hybrid app page,我们开发了这个扩展插件。本插件的主要目的是提供一些jsbridge能力,具体来说即为window提供了一个ToutiaoJSBridge对象,使chrome具有像webview一样的行为。例如:当页面调用了window.ToutiaoJSBridge.call('appInfo')获取宿主app信息时,我们的扩展将会拦截window.ToutiaoJSBridge.call这个函数调用,并返回一些数据。这样就像在webview里访问页面一样,可以正常展示。如果没有我们的扩展,页面将会因为在chrome上找不到window.ToutiaoJSBridge这个对象而抛出错误,从而导致无法交互。

以https://hotsoon.snssdk.com/falcon/live_inapp/page/push_hot#/selfList这个页面为例,当我们打开它时,它调用了window.ToutiaoJSBridge.call('fetch')与application进行通信。如果不安装我们的扩展,我们的window上面并没有ToutiaoJSBridge这个方法,因此这次调用会报错,从而导致我们不能正常浏览这个页面。

总的来说,我们的这个扩展是为了让chrome像webview一样具备一些jsbridge,这样可以更方便的在chrome上浏览我们的一些h5 hybrid application page,我们承诺,不会收集用户数据,也不会做一些其他无关的事情,谢谢。

本次是版本1.2.2,对代码进行了压缩以减小体积,同时优化了一些默认参数。

Top Extensions

 
(10943)
 
(50577)
 
(98995)
 
(25231)
 
(8324)
 
(1434)
 
(11367)

What has inspired us?

Extore is a team of professionals who are passionate about creating extensions for web browsers. This devotion also gives us opportunity to appreciate work of other people. We get inspired by useful, open source extensions made by developers all over the world. Our strong belief is that one should share helpful add-ons with others. That’s why we’d like to present you our ever-growing list of favourite extensions that have inspired us. Moreover, as you probably have already learned, sometimes struggling for the best brings an end to the good. Talking about add-ons it often turns out that an upgrade is worse then previous version. Also it can become really tricky to get back to the beloved version of your favourite extension. That’s why we’re going to make not only the latest, but all versions of our favourite (and we hope yours too) add-ons available for download. No more compromises, just stick to the version you really like!