Skip to content

Instantly share code, notes, and snippets.

@peter279k
Last active July 11, 2020 03:05
Show Gist options
  • Save peter279k/1ccc72a66ca7d253edc2b280f4f051c2 to your computer and use it in GitHub Desktop.
Save peter279k/1ccc72a66ca7d253edc2b280f4f051c2 to your computer and use it in GitHub Desktop.
This is a LINE Chrome Extension guideline

LINE Chrome Extension

Introduction

LINE App Images

Chrome Extension 下載連結

使用條件

  • 使用Google Chrome瀏覽器

使用方式

  • 打開Google Chrome瀏覽器
  • 安裝並下載LINE Chrome Extension

LINE Chrome Extension Download Page

使用示意圖

  • 在瀏覽器中,打開有LINE圖示的瀏覽器外掛

LINE Icon

  • 接著,需要進行登入的操作

LINE Login Page

  • 在上述填入使用者信箱與密碼之後,即可登入

  • 若是在此瀏覽器第一次使用此LINE Chrome外掛,則需要先在手機上進行認證

LINE Login Authentication

  • 接著,登入成功之後,就可以進入如下的畫面

LINE Index Page with Messages

Chrome Extension 開發者模式

  • Chrome Extension 外掛與一般前端網站相同,都可以開啟 Chrome Dev Tools
  • 開啟方式如下:
  • 打開LINE Chrome 外掛之後,在視窗上直接按下「F12」並可以打開此登入頁面的 Chrome Dev Web Tool,如下示意圖:

LINE Chrome Extension with Chrome Dev Tool

  • 由上圖得知,有了Chrome Dev Tool工具之後,就可以試著進行程式的Trace追蹤與除錯,以及監控所有此瀏覽器外掛發送的HTTP請求等

相關功能限制

  • LINE Chrome Extension 目前僅只有支援訊息以及圖片的顯示好友與群組列表,新增好友
  • 而有些功能沒有支援,像是通話視訊等,還有針對某個對話的回覆等細微的進階功能。

更新 (2020/07/10)

  • 相關訊息,如登入,訊息等儲存在IndexedDB

IndexedDB2

IndexedDB

LINE_DB_Table

Chat_Id

Chat_Record

DB_User

DB_User_Table

想拿到LINE Chrome App的原始碼做追蹤?

  • 發現有這個外掛

    Chrome Extension Source Viewer

    Chrome Extension Viewer

    Chrome Extension Zip

    Chrome Extesnsion Res

    Chrome Extension JS

    Chrome Extesnoin JS file

    • JS都有轉譯過 (bundling, minify)
      • 把參數,不必要空白去掉與更換
      • 較不容易做追蹤

那把JS檔案做格式化再載入?

Format JS

Formatting JS

  • 將Chrome載入Extension調整成開發者模式以便載入未封裝的Chrome Extension專案

  • 在Chrome新分頁上輸入:「chrome://extensions/」

Developer Mode

Load Unpacked

Select Extension Firectory

Load LINE Extension Status

Normal Load LINE Extesnion

LINE Chrome Extension App

  • 會出現上述畫面,直接卡住,若是完全沒有更動原始碼才可以成功載入
  • 這樣無法對既有的JS程式進行trace追蹤
  • 懷疑遠端有做類似Checksum的動作(minified js checksum)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment