From d679eaceacc3374579ecde8f0dc37a4065c9af55 Mon Sep 17 00:00:00 2001 From: Hyuns Date: Wed, 19 May 2021 03:05:09 +0900 Subject: [PATCH] update --- .gitignore | 1 + block/html/index.html | 15 +------ block/imglink/index.html | 26 +---------- block/notion-tools-block-module.js | 38 ++++++++++++++++ block/style.css | 4 -- block/table/index.html | 26 +---------- block/template/index.html | 44 ------------------- ...0\353\212\224 \354\275\224\353\223\234.md" | 21 +++++++-- make/html/index.html | 25 +---------- make/imglink/index.html | 25 +---------- make/module.js | 42 ++++++++++++++++++ make/moudle.js | 21 --------- make/table/index.html | 3 +- 13 files changed, 109 insertions(+), 182 deletions(-) create mode 100644 .gitignore create mode 100644 block/notion-tools-block-module.js delete mode 100644 block/template/index.html create mode 100644 make/module.js delete mode 100644 make/moudle.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c782149 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +test-server/ \ No newline at end of file diff --git a/block/html/index.html b/block/html/index.html index 6a3436f..707ff7a 100644 --- a/block/html/index.html +++ b/block/html/index.html @@ -8,12 +8,12 @@ window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', 'G-B71G27CBP0'); + 노션툴즈 HTML블록 - - - \ No newline at end of file diff --git a/block/imglink/index.html b/block/imglink/index.html index 92a079e..3525a0c 100644 --- a/block/imglink/index.html +++ b/block/imglink/index.html @@ -13,12 +13,9 @@ window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments); } gtag('js', new Date()); - gtag('config', 'G-B71G27CBP0'); + @@ -58,33 +56,13 @@

노션툴즈 이미지링크 배포

diff --git a/block/notion-tools-block-module.js b/block/notion-tools-block-module.js new file mode 100644 index 0000000..b40bf9a --- /dev/null +++ b/block/notion-tools-block-module.js @@ -0,0 +1,38 @@ +function getParameterByName(name) { + name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); + var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), + results = regex.exec(location.search); + return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); +} + +function copylink() { + var copyText = document.getElementById('output_link'); + copyText.select(); + copyText.setSelectionRange(0, 99999); + document.execCommand("copy"); +} + +function apply_theme() { + let theme = getParameterByName('t'); + if (theme != "black") { + $("body").addClass("white"); + } else { + $("body").addClass("black"); + } +} + +if (window.location != window.parent.location) { + $.ajax({ + url: 'https://api2.notion-tools.com/embed', + data: { + in: document.location.href, + out: document.referrer + }, + type: "POST", + dataType: "json" + }).done(json => { + console.log("Server connection successful") + }).fail((xhr, status, errorThrown) => { + console.log(`Server connect fail ${status} ${errorThrown}`) + } ) +} diff --git a/block/style.css b/block/style.css index e7697fd..632abe1 100644 --- a/block/style.css +++ b/block/style.css @@ -46,15 +46,11 @@ body { .memu { font-size: 30px; - /* width: 40px; - height: 40px; */ position: fixed; - /* display: none; */ right: 10px; bottom: -40px; transition: 0.5s; cursor: pointer; - } .show { diff --git a/block/table/index.html b/block/table/index.html index e1eb583..fa9878d 100644 --- a/block/table/index.html +++ b/block/table/index.html @@ -16,6 +16,7 @@ gtag('config', 'G-B71G27CBP0'); + - - - - - - - - - \ No newline at end of file diff --git "a/block/\354\236\220\354\243\274\354\223\260\353\212\224 \354\275\224\353\223\234.md" "b/block/\354\236\220\354\243\274\354\223\260\353\212\224 \354\275\224\353\223\234.md" index dc98728..bc4c57b 100644 --- "a/block/\354\236\220\354\243\274\354\223\260\353\212\224 \354\275\224\353\223\234.md" +++ "b/block/\354\236\220\354\243\274\354\223\260\353\212\224 \354\275\224\353\223\234.md" @@ -1,6 +1,6 @@ # Notion Tools 자주 사용하는 코드 -*파라미터 가져오기 +* 파라미터 가져오기 ```js function getParameterByName(name) { @@ -13,7 +13,7 @@ } ``` -*복사하기 (id 변경 필요) +* 복사하기 (id 변경 필요) ```js function copylink() { @@ -24,7 +24,7 @@ function copylink() { } ``` -*색상 테마 +* 색상 테마 ```js if (theme != "black") { @@ -34,7 +34,7 @@ if (theme != "black") { } ``` -*글자 방향 +* 글자 방향 ```js if (align == "left") { @@ -47,3 +47,16 @@ if (align == "left") { $("#wcii").css("text-align", "center"); } ``` + +* 구글 애널리틱스 +```html + + + +``` + \ No newline at end of file diff --git a/make/html/index.html b/make/html/index.html index 1295927..b31561f 100644 --- a/make/html/index.html +++ b/make/html/index.html @@ -8,6 +8,7 @@ + diff --git a/make/imglink/index.html b/make/imglink/index.html index d1c5758..11948d2 100644 --- a/make/imglink/index.html +++ b/make/imglink/index.html @@ -17,6 +17,7 @@ Notion Tools - 노션툴즈 + @@ -51,29 +52,6 @@ Notion Tools - 노션툴즈 - +