├── images ├── get_started16.png ├── get_started32.png ├── get_started48.png └── get_started128.png ├── manifest.json ├── README.md └── background.js /images/get_started16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leochen-g/wechrome/HEAD/images/get_started16.png -------------------------------------------------------------------------------- /images/get_started32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leochen-g/wechrome/HEAD/images/get_started32.png -------------------------------------------------------------------------------- /images/get_started48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leochen-g/wechrome/HEAD/images/get_started48.png -------------------------------------------------------------------------------- /images/get_started128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leochen-g/wechrome/HEAD/images/get_started128.png -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "WeChrome", 3 | "version": "1.0", 4 | "description": "Unblock web version of WeChat", 5 | "permissions": [ 6 | "activeTab", 7 | "webRequest", 8 | "webRequestBlocking", 9 | "https://wx.qq.com/*", 10 | "https://web.wechat.com/*", 11 | "https://wx2.qq.com/*", 12 | "https://wx8.qq.com/*" 13 | ], 14 | 15 | "background": { 16 | "scripts": ["background.js"] 17 | }, 18 | "icons": { 19 | "16": "images/get_started16.png", 20 | "32": "images/get_started32.png", 21 | "48": "images/get_started48.png", 22 | "128": "images/get_started128.png" 23 | }, 24 | "manifest_version": 2 25 | } 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WeChrome 2 | 3 | A Chrome extension to unblock Web Version of WeChat 4 | 5 | 6 | Tired of Tencent for not providing Linux version of WeChat? Run into the following error while logging into web version of WeChat? 7 | 8 | ``` 9 | To protect your account, logging in to WeChat via the web has been suspended. Use WeChat for Windows or WeChat for Mac to log in on a computer. Download WeChat for Windows or Mac at http://wechat.com. 10 | ``` 11 | 12 | This extension bypasses this check! 13 | 14 | ## how to use 15 | 16 | 1、Download this project into your pc 17 | 18 | 2、add offline plugin into your chrome 19 | 20 | 3、open [https://wx.qq.com/?target=t](https://wx.qq.com/?target=t) 21 | 22 | 23 | -------------------------------------------------------------------------------- /background.js: -------------------------------------------------------------------------------- 1 | let wechatHeaders = { 2 | extspam: 3 | 'Go8FCIkFEokFCggwMDAwMDAwMRAGGvAESySibk50w5Wb3uTl2c2h64jVVrV7gNs06GFlWplHQbY/5FfiO++1yH4ykCyNPWKXmco+wfQzK5R98D3so7rJ5LmGFvBLjGceleySrc3SOf2Pc1gVehzJgODeS0lDL3/I/0S2SSE98YgKleq6Uqx6ndTy9yaL9qFxJL7eiA/R3SEfTaW1SBoSITIu+EEkXff+Pv8NHOk7N57rcGk1w0ZzRrQDkXTOXFN2iHYIzAAZPIOY45Lsh+A4slpgnDiaOvRtlQYCt97nmPLuTipOJ8Qc5pM7ZsOsAPPrCQL7nK0I7aPrFDF0q4ziUUKettzW8MrAaiVfmbD1/VkmLNVqqZVvBCtRblXb5FHmtS8FxnqCzYP4WFvz3T0TcrOqwLX1M/DQvcHaGGw0B0y4bZMs7lVScGBFxMj3vbFi2SRKbKhaitxHfYHAOAa0X7/MSS0RNAjdwoyGHeOepXOKY+h3iHeqCvgOH6LOifdHf/1aaZNwSkGotYnYScW8Yx63LnSwba7+hESrtPa/huRmB9KWvMCKbDThL/nne14hnL277EDCSocPu3rOSYjuB9gKSOdVmWsj9Dxb/iZIe+S6AiG29Esm+/eUacSba0k8wn5HhHg9d4tIcixrxveflc8vi2/wNQGVFNsGO6tB5WF0xf/plngOvQ1/ivGV/C1Qpdhzznh0ExAVJ6dwzNg7qIEBaw+BzTJTUuRcPk92Sn6QDn2Pu3mpONaEumacjW4w6ipPnPw+g2TfywJjeEcpSZaP4Q3YV5HG8D6UjWA4GSkBKculWpdCMadx0usMomsSS/74QgpYqcPkmamB4nVv1JxczYITIqItIKjD35IGKAUwAA==', 4 | "client-version": "2.0.0", 5 | }; 6 | 7 | let wechatUrls = ["https://wx.qq.com/*", "https://web.wechat.com/*", "https://wx2.qq.com/*", "https://wx8.qq.com/*"]; 8 | 9 | chrome.webRequest.onBeforeRequest.addListener( 10 | function (details) { 11 | let url = new URL(details.url); 12 | if (url.pathname == "/" && url.search.indexOf("target=t") == -1) { 13 | if (url.search == "" || url.search == "?") { 14 | url.search = "?"; 15 | } else { 16 | url.search += "&"; 17 | } 18 | url.search += "target=t"; 19 | return { redirectUrl: url.href }; 20 | } 21 | return {}; 22 | }, 23 | { urls: wechatUrls }, 24 | ["blocking"] 25 | ); 26 | 27 | chrome.webRequest.onBeforeSendHeaders.addListener( 28 | function (details) { 29 | let url = new URL(details.url); 30 | if (url.pathname == "/cgi-bin/mmwebwx-bin/webwxnewloginpage") { 31 | for (var k in wechatHeaders) { 32 | details.requestHeaders.push({ 33 | name: k, 34 | value: wechatHeaders[k], 35 | }); 36 | } 37 | return { requestHeaders: details.requestHeaders }; 38 | } 39 | return {}; 40 | }, 41 | { urls: wechatUrls }, 42 | ["blocking", "requestHeaders"] 43 | ); 44 | --------------------------------------------------------------------------------