robertabcd / pttchrome Goto Github PK
View Code? Open in Web Editor NEWA GNU/GPL telnet client for connecting to BBS site ptt.cc (forked from iamchucky/PttChrome).
Home Page: https://term.ptt.cc
License: GNU General Public License v2.0
A GNU/GPL telnet client for connecting to BBS site ptt.cc (forked from iamchucky/PttChrome).
Home Page: https://term.ptt.cc
License: GNU General Public License v2.0
實作會有點複雜,要在 PTT 出現「輸入密碼」的文字的時候貼一個 <input type="password">
在游標的位置,且把 focus 從隱形的 <input>
移過去。總之先開 issue 建議一下,感謝。
瀏覽器: Chrome, Edge
OS: Windows 11 23H2
PttChromec的最下面一行,約一半被工作列擋住
需重新啟動Chrome才能解決
如圖所示,正確的顯示方式(PttChrome):
異常(term.ptt.cc):
可看到最下面那張圖片的預覽窗格跳到上方的邊界之外了
(範例來源: #1ZK1c_RV (MobileComm) [ptt.cc] [討論] 安卓手機APP各種BUG)
經測試,只在按下F11的全螢幕模式下才會有此bug,一般模式則似乎正常
--
10/23補充:經再次確認,一般模式位置亦會亂跳,不限全螢幕模式
有時使用者送來熱訊時,並不會被正確偵測爲熱訊訊息,造成 PttChrome 不送出通知。
見 parseWaterball()
的正規表示式:
PttChrome/src/js/string_util.js
Lines 154 to 160 in 88e3562
/\x1b\[1;33;46m\u2605(\w+)\x1b\[0;1;37;45m (.+) \x1b\[m\x1b\[K/g
這是在清除畫面底部後,某個使用者第一次送過來的熱訊的正規表示式。
/\x1b\[24;\d{2}H\x1b\[1;37;45m([^\x1b]+)(?:\x1b\[24;18H)?\x1b\[m/g
這是未清除畫面底部時,同一個使用者連續送過來的熱訊的正規表示式。
注意使用者代號被跳過。這是由於 pfterm 對輸出畫面資料的最佳化。
其中 \x1b\[24;\d{2}H
所匹配的,是設定游標位置的控制碼(屬於「移位碼」):
24
是畫面底部的橫行的編號 (最上方的橫行的編號是 1)。
\d{2}
是跳過了使用者代號後,熱訊內文的開頭所在的縱列的編號 (最左方的縱列的編號是 1)。
然而,由於 pfterm 的輸出最佳化,使用者端所接收到的熱訊訊息的格式,實際上不一定會符合以上任一狀況。
比如:如果有兩個代號前幾字相同的使用者送來熱訊,那麼輸出時就會從使用者代號不相同的部分開始輸出,這時就不會被以上兩個正規表示式匹配。
將 App.prototype.onData()
內的判斷邏輯,改爲偵測可能是熱訊的資料。
而當偵測到有熱訊送來,則從畫面擷取眞正的熱訊訊息。
轉自: #1XThzXVK (PttBug) [ptt.cc]
回報內容:
如題,term.ptt.cc(以下簡稱term)是基於PttChrome製作而成的支援wss版本
而PttChrome內有一個「Live文小幫手」也被繼承過來
簡單來說它是一個可以在Live文中自動更新推文的小功能(最短可到1秒/次)
在收看特定直播(例如每日疫情記者會、電競比賽、三金頒獎)等狀況下很好用但是,在term這邊的這個功能雖然有在右鍵功能表以及設定中顯示出來
實際上卻是無法使用,點選後毫無反應,一樣不會自動更新推文
而PTT網頁版雖然有自動更新推文並捲動的功能,但也早就故障許久未修
前往term的GitHub也可以發現最後一次commit已是去年4月
所以想在此同時請教:這個軟體及站點是否已經處於abandoned狀態...?以上bug回報,問題的部分也同時希望有人可解答!
as title thx a lot
plz!!!
Arrow keys are crucial in PTT experience. Currently it's not possible to use arrow keys on iOS, even with external keyboard. A possible simple fix for external keyboard is described below:
Here's a table of crucial keys for PTT, properties of KeyboardEvent, verified on iOS 11.2.5 Safari:
key |
keyCode |
|
---|---|---|
↑ | UIKeyInputTopArrow | 0 |
↓ | UIKeyInputBottomArrow | 0 |
← | UIKeyInputLeftArrow | 0 |
→ | UIKeyInputRightArrow | 0 |
control | Dead | 0 |
Currently it looks impossible to identify "control" and combination keys. We'll focus on arrow keys below.
Issue 1: keyCode
This line of code filtered out all of those keys. Since keyCode
is deprecated, key
should be preferred (ref: KeyboardEvent, Example code).
Issue 2: key
value
Sadly, iOS does not return standard key
value (but macOS does). However, it's still possible to simply add those key
values listed above to corresponding standard values, ex. case 'ArrowLeft'
along with case 'UIKeyInputLeftArrow'
.
使用環境:
作業系統: OSX
瀏覽器: Chrome
目前水球來的時候不會跳通知,沒有 notification 應該是被瀏覽器擋下來了
建議在 term_view.js 的 showWaterballNotification 新增
if (Notification.permission != 'granted') {
Notification.requestPermission()
}
來解決這個問題。
原先的程式碼是這樣:
showWaterballNotification: function() {
if (!this.enableNotifications) {
return;
}
var app = this.bbscore;
修改成:
showWaterballNotification: function() {
if (!this.enableNotifications) {
return;
}
if (Notification.permission != 'granted') {
Notification.requestPermission()
}
var app = this.bbscore;
[^W] 迷路了 我在哪裡(查詢目前之所在分類群組)
跟 chrome 瀏覽器的關閉頁面 ctrl+W 按鍵衝突
Line 622 in 96c5e5e
Erase to right :)
在Microsoft Edge下,Home,Page up,Page down都正常,唯讀End不起作用
試了Firefox和Chrome,都沒有這項問題
這是Edge本身的限制嗎,或者有辦法透過修正解決?
Fonts and other images in compiled css look like:
@font-face {
font-family: SymMingLiu;
src: url(assets/symmingliu.aaa394dd81dbe129da06687a75bfe002.woff)
}
The url should be relative to the css file, so it shouldn't have assets/
prefix.
resolve-url-loader seems to be advertising to do the trick but I can't make it to work.
A quick workaround on the server side can be implemented fairly easily.
原本以為不同輸入法都會遇到一樣的問題,
結果發現注音輸入法好像無法重現(?)
問題:
在 macOS 編輯/發表文章時,
使用內建倉頡輸入法打全形冒號「:」會跳到說明的頁面,
就是按 Ctrl+Z 進到的頁面
注意輸入法因為不會直接輸入
所以不會有這個問題
倉頡輸入法會直接輸入「:」
但不知道被解讀成什麼了所以會跳到說明頁面
1. 開啟滑鼠瀏覽下左鍵點擊連結沒有效果(已解決)
2. 貼上操作開放使用滑鼠執行
3. 滑鼠瀏覽底色設定問題
4. 內建自動登入功能(如果做得到的話)
如題 pbs.twimg.com 無法自動預覽
鍵盤上沒有 Insert 鍵 😭
普通 Mac 上使用的 Cmd + V 沒有作用(應該可以聽 paste event 取得貼上的字串),但要測試才知道會不會在 PC 上和 Ctrl + V 衝突(要輸入 Ctrl + V 變成貼上字串 ...)
用中文輸入法 不管是 fctix ibus hime 游標都不會跟隨輸入位置 而是停在螢幕最左邊
不管是chrome firefox 都一樣
應該可以確定是這裡的issue
之前有莫名其妙恢復正常過 但現在又是老樣子
嗨請問一下,最近會一直遇到只要閒置五分鐘 就會斷線還要重新連線才可以回來的問題?
請問這問題會是哪邊的問題呢?
遇到的問題: 純粹程式碼寫法問題
在 parseWaterball
(string_utils.js:L155)[https://github.com/robertabcd/PttChrome/blob/88e3562e6536cc0a91dbbb9f65e59036e4b73b79/src/js/string_util.js#L155]
當中的正則表示式
export function parseWaterball(str) {
var regex = new RegExp(/\x1b\[1;33;46m\u2605(\w+)\x1b\[0;1;37;45m (.+) \x1b\[m\x1b\[K/g);
var result = regex.exec(str);
if (result && result.length == 3) {
return { userId: result[1], message: result[2] };
} else {
regex = new RegExp(/\x1b\[24;\d{2}H\x1b\[1;37;45m([^\x1b]+)(?:\x1b\[24;18H)?\x1b\[m/g);
result = regex.exec(str);
if (result && result.length == 2) {
return { message: result[1] };
}
}
return null;
};
其中如果使用了 new RegExp 的話,那應該就不需要外面以 / 包圍了吧?
也就是應該改成
var regex = /\x1b\[24;\d{2}H\x1b\[1;37;45m([^\x1b]+)(?:\x1b\[24;18H)?\x1b\[m/g;
或是
var regex = new RegExp("\x1b\[24;\d{2}H\x1b\[1;37;45m([^\x1b]+)(?:\x1b\[24;18H)?\x1b\[m", "g");
這樣?
One site that came up a lot is pbs.twimg.com (Twitters's image host).
Opening all links with .jpg or .png endings might lead to security/privacy issues.
如果直接在Chrome開https://term.ptt.cc/
https://i.imgur.com/yKbzJsv.png
設定沒有自動登入..
如果是獨立啟動APP,就有這個選項
https://i.imgur.com/sK4F1PD.png
請問有人有一樣的問題嗎?
type=? on the anchor tag
Line 382 in 40c1846
it's used to annotate that the link is an image. Later, the it uses css selector to find all the images and does further processing:
Line 788 in e317cae
From:
#21 (comment)
Due to the removal of code in #31
gd 40a8fa236fe4cde0358586cee3ccb6edbe0f70e0
如標題,已經等這個很久了
在Ubuntu 18.04/Linux MINT 19,使用fcitx輸入法框架,目前無法正常在Chrome/Opera等Chromium base的瀏覽器正常中文輸入,但在FireFox是沒問題的,以前是能正常輸入的,不確定是不是Chrome更新後產生的問題…
PS: PttChrome沒問題,是term.ptt.cc有問題....是不是應該改向ptt站方反應,不好意思 XD
PTT最近投票需要取得驗證碼
但是當使用右鍵選單貼上的時候
驗證碼無法貼上 且會造成畫面直接卡死在驗證畫面 只能重新整理
而使用快捷鍵、Chrome沒有這些問題
我想這應該是個bug 就麻煩大大修復一下惹@@
https://www.ptt.cc/bbs/Browsers/M.1529829828.A.F77.html
我用imagus套件也是沒辦法預覽圖片
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.