mirror of
https://forge.chapril.org/tykayn/orgmode-to-gemini-blog
synced 2025-06-20 09:04:42 +02:00
up typos
This commit is contained in:
parent
bda4f016f7
commit
35ad36e632
5 changed files with 64 additions and 28 deletions
|
@ -1,11 +1,11 @@
|
|||
// search bar to send a request to a search engine for the current domain when sent
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
// Obtient le nom de domaine de la page courante
|
||||
const currentDomain = window.location.hostname;
|
||||
const form = document.getElementById('recherche');
|
||||
|
||||
// Ajoute un écouteur d'événement pour l'événement 'submit'
|
||||
form.addEventListener('submit', function(event) {
|
||||
form.addEventListener('submit', function (event) {
|
||||
// Empêche le comportement par défaut du formulaire
|
||||
event.preventDefault()
|
||||
const query = document.getElementById('query').value
|
||||
|
@ -13,4 +13,42 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||
|
||||
window.location.href = url;
|
||||
});
|
||||
|
||||
// navigation au clavier
|
||||
// Sélectionnez le lien à cliquer
|
||||
const nextArticleLink = document.querySelector('a.next-article');
|
||||
const previousArticleLink = document.querySelector('a.previous-article');
|
||||
|
||||
// Ajoutez un événement de clic au lien
|
||||
nextArticleLink.addEventListener('click', function () {
|
||||
// Redirigez l'utilisateur vers la page suivante
|
||||
window.location.href = nextArticleLink.href;
|
||||
});
|
||||
previousArticleLink.addEventListener('click', function () {
|
||||
// Redirigez l'utilisateur vers la page suivante
|
||||
window.location.href = nextArticleLink.href;
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Ajoutez un événement de touche au document
|
||||
document.addEventListener('keydown', function (event) {
|
||||
// Vérifiez si la touche appuyée est 'n' ou la flèche droite
|
||||
if (event.key === 'n' || event.key === 'ArrowRight') {
|
||||
// Empêche le comportement par défaut de la touche
|
||||
event.preventDefault();
|
||||
|
||||
// Cliquez sur le lien
|
||||
nextArticleLink.click();
|
||||
}
|
||||
if (event.key === 'p' || event.key === 'ArrowLeft') {
|
||||
// Empêche le comportement par défaut de la touche
|
||||
event.preventDefault();
|
||||
|
||||
// Cliquez sur le lien
|
||||
previousArticleLink.click();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue