kone
심야시장

심야시장

Base64 자동 디코더

05/25/2025, 18:18:11
유틸
4609 views · 3 likes

Tempermonkey 설치 후 아래 스크립트 추가 하기...


설명은 다른사람들이 알아서 할것 같아서 그냥 싸지르고 튀겠습니다.


1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

// ==UserScript==

// @name         Base64 AutoDecoder

// @namespace    http://tampermonkey.net/

// @version      1.0

// @description  디코딩 가능한 base64 문자열을 링크로 변환합니다.

// @author       Zeliper

// @match        https://kone.gg/s/imya/*

// @include      https://kone.gg/

// @grant        unsafeWindow

// ==/UserScript==

unsafeWindow.on = true ;

( function () {

'use strict' ;

// Base64 문자열을 URL로 디코딩하는 함수

function  decodeBase64ToURL(str) {

try  {

const  decoded =  atob(str); // Base64 디코딩

// URL이 http 또는 https로 시작하는지 확인

if  ( / ^https?:\ / \ //.test(decoded)) {

return  decoded; // 유효한 URL이면 반환

            }

        } catch  (e) {

return null ; // 디코딩 오류가 나면 null 반환

        }

return null ;

    }

// 텍스트에서 Base64 문자열을 찾아 링크로 변환하는 함수

function  replaceBase64WithLink(node) {

console .log( "Node : " , node);

const  base64Regex = / \b[a - zA - Z0 - 9 + / = ]{ 20 ,}\b / g; // Base64 문자열을 찾는 정규식

let  text =  node.textContent; // 텍스트 노드의 텍스트 내용

let  match;

const parent =  node.parentNode;

let  lastIndex = 0 ;

// 텍스트에서 Base64 문자열을 찾아서 처리

while  ((match =  base64Regex.exec(text)) ! = = null ) {

const  before =  text.slice(lastIndex, match.index);

const  base64Str =  match[ 0 ];

const  decodedURL =  decodeBase64ToURL(base64Str);

if  (decodedURL) {

console .log(decodedURL);

// 유효한 URL이 디코딩되었으면 링크로 변환

const  a = document .createElement( 'a' );

                a.href =  decodedURL;

                a.textContent =  decodedURL;

                a.target = '_blank' ;

//node.textContent = ''; // <-- 나중에 문제 없으면 이거 넣어서 해도 될듯

                node.appendChild( document .createElement( 'br' ));

                node.appendChild(a);

            } else {

console .log( "Failed" );

            }

            lastIndex =  base64Regex.lastIndex;

        }

    }

// .prose-container의 Shadow DOM을 탐색하여 텍스트 변환

function  walkShadowRoot(shadowRoot) {

const  textNodes =  shadowRoot.querySelectorAll( ':not(div)' );

// 모든 텍스트 노드를 확인

        textNodes.forEach(node = >  {

            replaceBase64WithLink(node);

        });

    }

// .prose-container가 로드된 후 Shadow DOM 탐색

function  processShadowRoot() {

const  container = document .body.querySelector( '.prose-container' );

if  (container & &  container.shadowRoot) {

            walkShadowRoot(container.shadowRoot); // Shadow DOM 처리

        }

    }

// 페이지가 완전히 로드된 후 실행

function  onLoad() {

        processShadowRoot();

    }

// MutationObserver를 사용하여 .prose-container의 Shadow DOM 로드를 감지

const  observer = new  MutationObserver(() = >  {

const  container = document .body.querySelector( '.prose-container' );

if  (container & &  container.shadowRoot) {

            processShadowRoot();

        }

    });

// .prose-container가 추가될 때까지 대기

    observer.observe( document .body, { childList: true , subtree: true  });

// 페이지 로딩이 완료되면 바로 실행

if  ( document .readyState = = = 'complete' ) {

        onLoad();

    }

})();

cs

3
6 comments
Sign in to comment
05/25/25
복붙하니까 eslint : no-multi-spaces - multiple spaces found before 이런 오류 뜨는 데 왜 그런지 암?
주황색 세모에 ! 있는거 왼쪽 line표시에 나오는거면 eslint 문법 체크인데 무시해도됨. 실제 동작 하는지 페이지 새로고침 해서 base64문자 밑에 링크 생성만 되면 동작하고 있는거임
05/26/25 Edited 04/02

Deleted comment.

05/27/25 Edited 04/02

Deleted comment.

11/15/25
안되는데..
Sign in to comment
네코파라 시리즈 복구부탁드립니다
질문&요청
godingview
09/27/25 1325 -2
Go to 씨뿌리기 1-2편
동인
aqdpdl11-000
09/27/25 5683 8
Go to 씨뿌리기 1-1편
동인
aqdpdl11-000
09/27/25 9023 17
[복구요청] RJ01201737 Reminiscence 복구 부탁드립니다..
일반
minu0811
09/27/25 1190 7
(노모) 카카오 병원 시리즈
동인
lion159753
09/27/25 5810 17
[질문] 게임 속 영상 나오는 부분만 색이 이상합니다. 고수님들 도와주세요.
질문&요청
nionion
09/26/25 1447 0
[복구 요청] 몬무스 퀘스트 패러독스 종장
일반
5318008
09/26/25 1426 4
[복구요청] RJ01201737 Reminiscence
질문&요청
minu0811
09/26/25 1121 3
라임라이트・레모네이드 잼
번역
L
09/26/25 13211 76
[복구요청] 롤플레이어2 복구해주세요
질문&요청
animeke
09/25/25 1352 -5
[요청] 거유 판타지 1 외전 1&2
질문&요청
어흙마이깟
09/25/25 1487 2
[RJ01146138] 무기력 천사쨩은 성활학과 학점이 부족해… 복구나 연장 가능할까요
질문&요청
nab
09/25/25 1412 1
[복구요청] 시크릿러브&After스토리
질문&요청
animeke
09/24/25 1178 0
에로검열관
질문&요청
fdshjf33
09/24/25 2168 0
클라나드랑 셔플이랑 air 요청드립니다
질문&요청
가리랑
09/24/25 794 -2
전생 노예 테오와 아저씨 용사
질문&요청
tkddj12340
09/24/25 2237 0
[복구 요청]lost chater
질문&요청
121400
09/24/25 1718 0
[복구 요청] oo0mmd
질문&요청
Ghost
09/24/25 2417 0
패러랠 판타지 IF+2.2
번역
5318008
09/24/25 6324 16
푸른 저편의 포리듬
번역
L
09/24/25 8533 44
Go to 씨뿌리기 2기
동인
aqdpdl11-000
09/24/25 9947 30
RJ01076970 [るりりソフト] 행복한 니트 키우기 v2.11 + RJ01428422 음성 DLC v1.5 (RJ01177602 한국어판, 노모)
번역
aleph0
09/24/25 7801 37
행복한 니트이야기를 개조해 봤습니다
일반
wdavgf
09/23/25 3095 5
[복구요청]방과 후 신데렐라 2 요청드려요
질문&요청
sciencebaro
09/23/25 1414 0
RJ01119288
일반
loona
09/23/25 1841 -3
[복구요청] RJ125993 갖고 있는 사람 있숨??
질문&요청
리위아봄은온다
09/23/25 1172 1
[복구요청]테니오하! ~여자아이도 사실은 엣치해?~
질문&요청
fghsfgsf
09/23/25 1413 3
[복구요청] 러브러브! 마이버디:크로스 한글 RJ269568 ラブラブ!マイばでぃ:クロス
질문&요청
yyane
09/23/25 2302 5
이거 원래 이런거임?
질문&요청
라임왕슬라임
09/23/25 1148 0
[복구요청] 네토라레 숙모 나츠코(41) ~젊은남자와의 변태섹스에 박히는 사실은 변태였던 엄마~
질문&요청
ryuari
09/23/25 1672 2