Skip to content

Commit c858ced

Browse files
committed
Update Config
1 parent 3ce78c5 commit c858ced

File tree

4 files changed

+33
-13
lines changed

4 files changed

+33
-13
lines changed

src/_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ menu:
1717
github_url: https://github.com/cssnr
1818

1919
discord_invite: https://discord.gg/wXy6m2X8wY
20-
discord_webhook: https://discord.com/api/webhooks/1258944618389569566/gqge0T5UZcJHLxfAFLPNjlzsuqikQJtTlCRvVWbw2ufDv_WrJ8yzVRWenb__s1PxyawH
20+
discord_webhook: https://relay.cssnr.com/discord/1258944618389569566

src/html/feedback.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,18 @@ <h1 class="align-middle mb-0">{{ site.site_name }} {{ page.title }}</h1>
3131
<button id="submit-btn" class="btn btn-success w-100" type="submit">
3232
Submit Feedback <i class="fa-regular fa-comment-dots ms-2"></i></button>
3333
</form>
34-
<div id="error-alert" style="display: none;">
35-
<div class="alert alert-danger fade show text-center mt-3" role="alert"></div>
36-
<div class="alert alert-warning fade show text-center" role="alert">
37-
<b>Note:</b> Privacy Badger and other content blockers may block <b>discord.com</b> by default.
38-
You will need to allow <b>discord.com</b> to submit this form since it uses a Discord webhook.
39-
</div>
40-
</div>
34+
<div id="error-alert" class="alert alert-danger alert-dismissible fade show text-center mt-2 mb-0 d-none" role="alert"></div>
35+
{% comment %}<div id="error"></div>{% endcomment %}
4136
</div> <!-- content-wrapper -->
4237
</div> <!-- d-flex -->
4338

39+
{% comment %}<div id="clone" class="d-none">{% endcomment %}
40+
{% comment %}<div class="alert alert-danger alert-dismissible fade show text-center mt-3" role="alert">{% endcomment %}
41+
{% comment %}<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>{% endcomment %}
42+
{% comment %}<span>Error</span>{% endcomment %}
43+
{% comment %}</div>{% endcomment %}
44+
{% comment %}</div>{% endcomment %}
45+
4446
<script src="https://cdnjs.cloudflare.com/ajax/libs/tsparticles/3.0.2/tsparticles.bundle.min.js" integrity="sha512-MM4W2ywPFL6GyTpBoj7PU6nyv2jJg47rLI8kEAL8vk20RHtAqIe9KdweahKUk+OivrdpZoMYfMi271ZdS6tRnQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
4547

4648
<script type="text/javascript" src="{{ "/js/config.js" | relative_url }}"></script>

src/js/config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,18 @@ const githubActions = [
288288
},
289289
fa: 'faShell',
290290
},
291+
{
292+
name: 'Portainer Stack Deploy',
293+
url: 'https://github.com/cssnr/portainer-stack-deploy-action',
294+
description:
295+
'Deploy Docker Stack to Remote Host using SSH Authentication.',
296+
links: {
297+
Actions:
298+
'https://github.com/marketplace/actions/portainer-stack-deploy-action',
299+
GitHub: 'https://github.com/cssnr/portainer-stack-deploy-action',
300+
},
301+
fa: 'faShell',
302+
},
291303
{
292304
name: 'Mozilla Addon Update',
293305
url: 'https://github.com/marketplace/actions/mozilla-addon-update-action',

src/js/feedback.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ redirect.searchParams.append('feedback', 'yes')
66
redirect.pathname = '/'
77

88
const discordUsername = 'Link Extractor'
9-
const discordAvatar = 'https://link-extractor.cssnr.com/media/logo.png'
9+
const discordAvatar = 'https://cssnr.github.io/media/logo.png'
1010

1111
const contentWrapper = document.getElementById('content-wrapper')
1212
const uninstallForm = document.getElementById('uninstall-form')
@@ -58,7 +58,8 @@ document.addEventListener('DOMContentLoaded', function () {
5858
async function formSubmit(event) {
5959
console.debug('formSubmit:', event)
6060
event.preventDefault()
61-
errorAlert.style.display = 'none'
61+
errorAlert.classList.add('d-none')
62+
// error.innerHTML = ''
6263
const url = event.target.elements['discord-webhook'].value
6364
// console.debug('url:', url)
6465
const app = event.target.elements['app-list'].value
@@ -81,7 +82,7 @@ async function formSubmit(event) {
8182
const response = await sendDiscord(url, lines.join('\n'))
8283
console.debug('response:', response)
8384
submitBtn.classList.remove('disabled')
84-
if (response.status >= 200 && response.status <= 299) {
85+
if (response.ok) {
8586
contentWrapper.classList.add(
8687
'animate__animated',
8788
'animate__backOutUp'
@@ -99,8 +100,13 @@ async function formSubmit(event) {
99100
}
100101

101102
function showError(message) {
102-
errorAlert.querySelector('.alert').textContent = message
103-
errorAlert.style.display = 'block'
103+
// const alert = document.querySelector('#clone > .alert').cloneNode(true)
104+
// errorAlert.querySelector('span').textContent = message
105+
errorAlert.textContent = message
106+
errorAlert.classList.remove('d-none')
107+
// error.appendChild(alert)
108+
// const bsAlert = new bootstrap.Alert(alert)
109+
// setTimeout(() => bsAlert.close(), 10000)
104110
}
105111

106112
async function sendDiscord(url, content) {

0 commit comments

Comments
 (0)