Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/wrap-ansi-8.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
clcmo authored Sep 18, 2023
2 parents 66e5ffb + 28533c8 commit e8250c8
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 164 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build with Jekyll
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/learn-github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
check-bats-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '14'
Expand Down
36 changes: 31 additions & 5 deletions assets/js/shorter.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,35 @@
//Encurtador
/*
* Encurtador de links
* Autor: Camila Oliveira
* Data: 18/09/2023
*/

const brandLinks = /ourbanna\.com|portalurbanna\.com\.br/;
var domain = "";

document.getElementById("myinput").onclick = function () {
var link = document.getElementById("linkinput").value;
var link = document.getElementById("linkinput").value;
if (!link.trim() || link < "https://" || link < "http://") {
console.log("O link está vazio.");
document.getElementById("message").innerHTML =
"<div class='notification is-danger is-danger'>" +
"<div class='icon-text'>" +
"<span class='icon has-text-danger'><i class='fas fa-info-warning'></i></span>" +
"<span><strong>Hm, parece que o link não existe, vamos tentar novamente?</strong></span>" +
"</span>" +
"</div>" +
"</div>";
} else {
// Verifica se o link não contém os domínios permitidos
if (!brandLinks.test(link)) {
domain = "do.encurtai.com";
console.log("O link não contém os domínios permitidos.");
} else {
domain = "n.ourbanna.com";
console.log("O link contém um dos domínios permitidos.");
}
var data = {
domain: "do.encurtai.com",
domain: domain,
originalURL: link,
allowDuplicates: false
};
Expand Down Expand Up @@ -35,5 +61,5 @@ document.getElementById("myinput").onclick = function () {
"</div>";
});
document.getElementById("linkinput").value = "";
};
}
};
193 changes: 37 additions & 156 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
"ws": "^7.4.6",
"xmlhttprequest-ssl": "^1.6.3",
"y18n": "^5.0.8",
"yargs": "^3.10.0",
"yargs": "^17.7.2",
"yargs-parser": "^20.2.9",
"yeast": "^0.1.2"
},
Expand Down

0 comments on commit e8250c8

Please sign in to comment.