kone
심야시장

심야시장

Base64 자동 디코더

05/25/2025, 18:18:11
유틸
4611 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
[복구] 나와 선생님의 개인수업1,2
번역
이웃집 유부녀 암컷섹스
09/16/25 2884 16
[복구]연상 그녀
번역
이웃집 유부녀 암컷섹스
09/16/25 2827 19
[복구요청]빗치 간호사 병원 ~기분 전환 성처리 간호해 드릴게요~
질문&요청
hyukshim
09/16/25 1360 1
[복구요청]네토라레 프린세스 ~공주도, 여왕도, 여기사도, 깨달았을 때에는 이미 네토라레 끝~
질문&요청
hyukshim
09/16/25 1588 0
[복구요청]대금은 몸으로 지불
질문&요청
hyukshim
09/16/25 1073 0
[복구요청]엣칭 어플 ~만남 어플로 속사정 있는 여성과 러브 러브 SEX~
질문&요청
hyukshim
09/16/25 988 0
[복구요청] 연애x로얄
질문&요청
오무라이스
09/16/25 792 0
[복구요청] 벚꽃, 싹트다. -as the Night's, Reincarnation-
질문&요청
Ghost
09/16/25 831 0
여동생 생활 판타지랑 비슷한 게임
질문&요청
sdlkfjow
09/16/25 1381 0
천박) relozer-vivian
영상
Ghost
09/16/25 3243 -5
pmz 모음
영상
Ghost
09/16/25 2783 -6
BISHOP 게임 모음집
번역
asize
09/16/25 10138 48
아마가미 테트리스
번역
L
09/16/25 5326 26
명각학원 태동편
번역
L
09/16/25 6276 31
하즈미와 아이 만들기 나라) 옛날에 식당에서 받았었는데 버전이 많아서 헷갈림
질문&요청
arauho
09/15/25 1739 -3
[복구완] 타락하는 알바 아내 ~연하남과의 정사에 빠진 끝에
번역
이웃집 유부녀 암컷섹스
09/15/25 5713 21
[복구] 이챠 누나! ~누나로 연습해볼래?
번역
이웃집 유부녀 암컷섹스
09/15/25 4396 25
[복구 요청] 한낮의 낡은 아파트와 유부녀들 ~폐쇄 공간에서 미쳐가며 타락해 간다
번역
이웃집 유부녀 암컷섹스
09/15/25 4611 22
복구완] 해도 나갈 수 없는 방에 갇혔기 때문에 계속해서 더 하는 이야기
번역
이웃집 유부녀 암컷섹스
09/15/25 3582 18
[복구] 꼬마로 다시 돌아가서 범하기!! 1_2
영상
Ghost
09/15/25 3648 -20
[미번역] 아마카노+ , 아마카노 ss+
미번
katress
09/15/25 3184 5
아마가미 ~조금 오마케 극장~
번역
L
09/15/25 4893 21
[복구요청] VenusBlood : lagoon 복구 부탁드립니다
질문&요청
omen6974
09/15/25 1279 0
[복구요청] [VJ01004376] 이챠 누나! ~누나로 연습해볼래?~ イチャ姉!
일반
mitchell12
09/15/25 939 0
아마가미 조금 오마케 극장 구해주실분
질문&요청
불개미
09/15/25 812 0
사사사구 최악의 재액인간에게 바친다 파일 구해주실분
질문&요청
불개미
09/15/25 1787 1
[앱, 번역 요청] Daily Lives of My Countryside-v0.3. 미번
kokm1230
09/14/25 3872 9
[Kuma no Ana (Shirokuma A)] Netorare Miboujin (_) Actress (Alice Gear Aegis)
동인
will1250
09/14/25 2911 1
[복구]두근두근 성춘 에로 마사지 학원! 질 쿵쿵×자지 빳빳×함께 절정!!
번역
이웃집 유부녀 암컷섹스
09/14/25 5760 27
[복구요청] 유카의 관 1,2 복구 부탁드려요
질문&요청
kokm1230
09/14/25 694 0