-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8d3aded
Showing
19 changed files
with
742 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
patreon: axorax |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: clear_deploys | ||
|
||
on: push | ||
|
||
jobs: | ||
deldep: | ||
runs-on: ubuntu-latest | ||
permissions: write-all | ||
|
||
steps: | ||
- name: Delete deployment | ||
uses: strumwolf/delete-deployment-environment@v2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
environment: github-pages | ||
onlyRemoveDeployments: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="shortcut icon" href="./favicon.svg" type="image/x-icon" /> | ||
<title>urlmskr</title> | ||
</head> | ||
<body> | ||
<script> | ||
const decoded = window.location.href.replace( | ||
"https://axorax.github.io/urlmskr/", | ||
"", | ||
); | ||
|
||
if (decoded.toLowerCase().endsWith("+reveal")) { | ||
document.head.innerHTML += '<link rel="stylesheet" href="./style.css">'; | ||
document.body.innerHTML = ` | ||
<div class="reveal center"> | ||
<div> | ||
<div class="top">This URL redirects to:</div> | ||
<div class="destination">${window.atob( | ||
decoded.slice(0, -7), | ||
)}</div> | ||
</div> | ||
</div> | ||
`; | ||
} else { | ||
window.location.replace(window.atob(decoded)); | ||
} | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<p align="center"><img src="./urlmskr.svg"></p> | ||
|
||
<p align="center"><a href="./README.md">English</a> — <a href="./README_zh.md">中文</a> — <a href="./README_bn.md">বাংলা</a></p> | ||
|
||
# ❓ About | ||
|
||
urlmskr lets you mask links and send encoded messages by changing a link to one that can't be easily read but still redirects to the original. It runs entirely on the frontend, requires no backend server, and stores no data. You can host it anywhere. Support the project on [Patreon!](https://www.patreon.com/axorax) <3 | ||
|
||
# 🤔 Why? | ||
|
||
Using a tool like urlmskr allows you to send a link without revealing the destination site. However, this could lead to receiving links to unwanted sites. To reveal the destination, simply add `+reveal` at the end of the URL. For example: `https://axorax.github.io/urlmskr/hello69+reveal`. | ||
|
||
# 💻 Integrate with your project | ||
|
||
urlmskr includes libraries for various programming languages in the root directory, named `lib` with the respective language extension. You can paste or import the code into your project. Here’s how to use the JavaScript library: | ||
|
||
```html | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<title>Example</title> | ||
</head> | ||
<body> | ||
<script src="https://axorax.github.io/urlmskr/lib.js"></script> | ||
<script> | ||
document.write(urlmskr.mask("https://axorax.github.io")); // Mask URL | ||
document.write("<br>"); // Add empty line | ||
document.write(urlmskr.mask("Hello", "text")); // Mask text | ||
</script> | ||
</body> | ||
</html> | ||
``` | ||
|
||
--- | ||
|
||
<p align="center"><a href="https://www.patreon.com/axorax">Support me on Patreon</a> — <a href="https://github.com/axorax/socials">Check out my socials</a></p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<p align="center"><img src="./urlmskr.svg"></p> | ||
|
||
<p align="center"><a href="./README.md">English</a> — <a href="./README_zh.md">中文</a> — <a href="./README_bn.md">বাংলা</a></p> | ||
|
||
> [!IMPORTANT] | ||
> এটি একটি মোটামুটি অনুবাদ এবং সঠিক নাও হতে পারে। আমি বাংলা জানি কিন্তু প্রুফরিড করার সময় পাইনি। | ||
# ❓ সম্পর্কিত | ||
|
||
urlmskr আপনাকে লিঙ্ক মাস্ক করতে দেয় এবং একটি লিঙ্ক পরিবর্তন করে এনকোড করা বার্তা পাঠাতে দেয় যা সহজে পড়া যায় না, তবুও মূলে পুনঃনির্দেশিত হয়। এটি সম্পূর্ণরূপে ফ্রন্টএন্ডে চলে, কোন ব্যাকএন্ড সার্ভারের প্রয়োজন হয় না এবং কোন ডেটা সঞ্চয় করে না। আপনি যে কোন জায়গায় এটি হোস্ট করতে পারেন. [Patreon!](https://www.patreon.com/axorax) <3 এ প্রকল্পকে সমর্থন করুন | ||
|
||
# 🤔 কেন? | ||
|
||
urlmskr এর মতো একটি টুল ব্যবহার করে আপনি গন্তব্য সাইটটি প্রকাশ না করে একটি লিঙ্ক পাঠাতে পারবেন। যাইহোক, এর ফলে অবাঞ্ছিত সাইটের লিঙ্ক পাওয়া যেতে পারে। গন্তব্য প্রকাশ করতে, URL-এর শেষে শুধু `+reveal` যোগ করুন। যেমন: `https://axorax.github.io/urlmskr/hello69+reveal`। | ||
|
||
# 💻 আপনার প্রকল্পের সাথে সংহত করুন | ||
|
||
urlmskr রুট ডিরেক্টরিতে বিভিন্ন প্রোগ্রামিং ভাষার জন্য লাইব্রেরি অন্তর্ভুক্ত করে, যার নাম `lib` সংশ্লিষ্ট ভাষা এক্সটেনশন সহ। আপনি আপনার প্রকল্পে কোড পেস্ট বা আমদানি করতে পারেন। জাভাস্ক্রিপ্ট লাইব্রেরি কীভাবে ব্যবহার করবেন তা এখানে: | ||
|
||
```html | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<title>উদাহরণ</title> | ||
</head> | ||
<body> | ||
<script src="https://axorax.github.io/urlmskr/lib.js"></script> | ||
<script> | ||
document.write(urlmskr.mask("https://axorax.github.io")); // মাস্ক URL | ||
document.write("<br>"); // খালি লাইন যোগ করুন | ||
document.write(urlmskr.mask("Hello", "text")); // মাস্ক পাঠ্য | ||
</script> | ||
</body> | ||
</html> | ||
``` | ||
|
||
--- | ||
|
||
<p align="center"><a href="https://www.patreon.com/axorax">Patreon এ আমাকে সমর্থন করুন</a> — <a href="https://github.com/axorax/socials">আমার সামাজিক চেক আউট করুন</a></p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<p align="center"><img src="./urlmskr.svg"></p> | ||
|
||
<p align="center"><a href="./README.md">English</a> — <a href="./README_zh.md">中文</a> — <a href="./README_bn.md">বাংলা</a></p> | ||
|
||
> [!IMPORTANT] | ||
> 这只是一个粗略的翻译,可能并不准确。 | ||
# ❓ 关于 | ||
|
||
urlmskr 可让你屏蔽链接并发送编码信息,方法是将链接更改为不易被读取但仍可重定向到原始链接的链接。它完全在前端运行,不需要后台服务器,也不存储数据。你可以将它托管到任何地方。在 [Patreon!](https://www.patreon.com/axorax) 上支持该项目 <3 | ||
|
||
# 🤔 为什么? | ||
|
||
使用 urlmskr 这样的工具可以发送链接而不显示目标网站。不过,这可能会导致接收到不想要的网站链接。要显示目的地,只需在 URL 结尾添加 `+reveal`。例如:`https://axorax.github.io/urlmskr/hello69+reveal`。 | ||
|
||
# 💻 与您的项目相结合 | ||
|
||
urlmskr 的根目录中包含各种编程语言的库,以相应语言的扩展名 "lib "命名。你可以将代码粘贴或导入到你的项目中。下面介绍如何使用 JavaScript 库: | ||
|
||
```html | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<title>示例</title> | ||
</head> | ||
<body> | ||
<script src="https://axorax.github.io/urlmskr/lib.js"></script> | ||
<script> | ||
document.write(urlmskr.mask("https://axorax.github.io")); // 屏蔽 URL | ||
document.write("<br>"); // 添加空行 | ||
document.write(urlmskr.mask("Hello", "text")); // 屏蔽文本 | ||
</script> | ||
</body> | ||
</html> | ||
``` | ||
|
||
--- | ||
|
||
<p align="center"><a href="https://www.patreon.com/axorax">在 Patreon 上支持我</a> — <a href="https://github.com/axorax/socials">查看我的社交网站</a></p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
exclude: | ||
- "*.md" | ||
- .github/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>urlmskr</title> | ||
<link rel="shortcut icon" href="./favicon.svg" type="image/x-icon" /> | ||
<link rel="stylesheet" href="./style.css" /> | ||
<script src="./script.js" defer></script> | ||
</head> | ||
<body class="center"> | ||
<div id="electric-surge"></div> | ||
|
||
<main class="center"> | ||
<input id="input" type="text" placeholder="Type here..." /> | ||
|
||
<div class="group"> | ||
<button id="mode-button" onclick="modeChange()"> | ||
<p>Mode: <span>Redirect</span></p> | ||
</button> | ||
<button id="mask-button">Mask</button> | ||
</div> | ||
|
||
<button id="copy-button">🔗 Copy Masked URL</button> | ||
|
||
<div class="output"> | ||
<span style="user-select: none">Type something to mask.</span> | ||
</div> | ||
|
||
<footer> | ||
Support me on <a href="https://patreon.com/axorax">Patreon!</a> | ||
</footer> | ||
</main> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>urlmskr</title> | ||
<link rel="shortcut icon" href="./favicon.svg" type="image/x-icon" /> | ||
</head> | ||
<body> | ||
<script src="./index.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
const params = new URLSearchParams(window.location.search); | ||
|
||
if (params.get("r") && params.get("r").toLowerCase().endsWith(" reveal")) { | ||
const url = params.get("r").slice(0, -7); | ||
document.head.innerHTML += '<link rel="stylesheet" href="./style.css">'; | ||
document.body.innerHTML = ` | ||
<div class="reveal center"> | ||
<div> | ||
<div class="top">This URL redirects to:</div> | ||
<div class="destination">${window.atob(url)}</div> | ||
</div> | ||
</div> | ||
`; | ||
} else if (params.get("r")) { | ||
window.location.replace(window.atob(params.get("r"))); | ||
} else if (params.get("t")) { | ||
const paragraph = document.createElement("p"); | ||
paragraph.innerText = window.atob(params.get("t")); | ||
document.body.append(paragraph); | ||
|
||
document.head.innerHTML += ` | ||
<style> | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
p { | ||
padding: .9rem 1.2rem; | ||
font-size: 2rem; | ||
font-family: Arial, Helvetica, sans-serif; | ||
} | ||
</style> | ||
`; | ||
} else { | ||
window.location.replace("https://axorax.github.io/urlmskr/create"); | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
function encode(text) { | ||
return window.btoa(text); | ||
} | ||
|
||
function decode(text) { | ||
return window.atob(text); | ||
} | ||
|
||
function mask(text, type) { | ||
if (type == "text") { | ||
return `https://axorax.github.io/urlmskr/?t=${encode(text)}`; | ||
} else { | ||
return `https://axorax.github.io/urlmskr/${encode(text)}`; | ||
} | ||
} | ||
|
||
const urlmskr = { | ||
encode, | ||
decode, | ||
mask, | ||
}; | ||
|
||
// Usage examples: | ||
// urlmskr.mask('urlmskr', 'text'); | ||
// urlmskr.mask('urlmskr', 'url'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
class urlmskr { | ||
public static function encode($text) { | ||
return base64_encode($text); | ||
} | ||
|
||
public static function decode($text) { | ||
return base64_decode($text); | ||
} | ||
|
||
public static function mask($text, $type) { | ||
if ($type == 'text') { | ||
return "https://axorax.github.io/urlmskr/?t=" . self::encode($text); | ||
} else { | ||
return "https://axorax.github.io/urlmskr/" . self::encode($text); | ||
} | ||
} | ||
} | ||
|
||
// Usage examples: | ||
// urlmskr::mask('urlmskr', 'text'); | ||
// urlmskr::mask('urlmskr', 'other'); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import base64 | ||
|
||
def encode(text): | ||
encoded_bytes = base64.b64encode(text.encode('utf-8')) | ||
return encoded_bytes.decode('utf-8') | ||
|
||
def decode(text): | ||
decoded_bytes = base64.b64decode(text.encode('utf-8')) | ||
return decoded_bytes.decode('utf-8') | ||
|
||
def mask(text, type): | ||
if type == 'text': | ||
return f"https://axorax.github.io/urlmskr/?t={encode(text)}" | ||
else: | ||
return f"https://axorax.github.io/urlmskr/{encode(text)}" | ||
|
||
urlmskr = { | ||
'encode': encode, | ||
'decode': decode, | ||
'mask': mask | ||
} | ||
|
||
# Usage examples: | ||
# urlmskr['mask']('urlmskr', 'text') | ||
# urlmskr['mask']('urlmskr', 'other') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
require 'base64' | ||
|
||
module Urlmskr | ||
def self.encode(text) | ||
Base64.strict_encode64(text) | ||
end | ||
|
||
def self.decode(text) | ||
Base64.strict_decode64(text) | ||
end | ||
|
||
def self.mask(text, type) | ||
encoded_text = encode(text) | ||
if type == 'text' | ||
"https://axorax.github.io/urlmskr/?t=#{encoded_text}" | ||
else | ||
"https://axorax.github.io/urlmskr/#{encoded_text}" | ||
end | ||
end | ||
end | ||
|
||
# Usage examples: | ||
# puts Urlmskr.mask('urlmskr', 'text') | ||
# puts Urlmskr.mask('urlmskr', 'url') |
Oops, something went wrong.