Greasy Fork is available in English.

게시판 » Greasy Fork 피드백

Line numbers above 9999 don't fit.

§
작성: 2023-11-26
수정: 2023-11-26

There is seems to be a browser limitation for <ol> lists, where only last 4 digits are fit in the available width. So, if script has more than 9999 lines, it starts showing incorrect line numbers.

A quick CSS-only solution for modern browsers:

ol
{
  --offset: 3.5ch;
  padding-inline-start:var(--offset);
}
ol:has(li:nth-child(10)){--offset:4.5ch}
ol:has(li:nth-child(100)){--offset:5.5ch}
ol:has(li:nth-child(1000)){--offset:6.5ch}
ol:has(li:nth-child(10000)){--offset:7.5ch}
ol:has(li:nth-child(100000)){--offset:8.5ch}
ol:has(li:nth-child(1000000)){--offset:9.5ch}
ol:has(li:nth-child(10000000)){--offset:10.5ch}
ol:has(li:nth-child(100000000)){--offset:11.5ch}
ol:has(li:nth-child(1000000000)){--offset:12.5ch}
ol:has(li:nth-child(10000000000)){--offset:13.5ch}
ol:has(li:nth-child(100000000000)){--offset:14.5ch}
ol:has(li:nth-child(1000000000000)){--offset:15.5ch}

§
작성: 2023-11-28
수정: 2023-11-28

Yes. The code viewer in GreasyFork is quite simple and basic.

You might consider using this to view code in GreasyFork. (just viewing, not editing)

https://greasyfork.org/en/scripts/472051

§
작성: 2024-08-10

You might consider using this to view code in GreasyFork. (just viewing, not editing)

It actually works about 5 times faster for larger scripts (10k+ lines) Thanks!

댓글 남기기

댓글을 남기려면 로그인하세요.