{"id":27950606,"url":"https://github.com/arthur-aps/jsbuttonchangedetection","last_synced_at":"2025-05-07T16:15:08.166Z","repository":{"id":284794105,"uuid":"955623926","full_name":"arthur-aps/jsButtonChangeDetection","owner":"arthur-aps","description":"Change detection on the href of an element in a Web Page by ID.","archived":false,"fork":false,"pushed_at":"2025-04-17T19:05:23.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T16:15:03.159Z","etag":null,"topics":["change-detection","javascript","script","website"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arthur-aps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-26T23:50:55.000Z","updated_at":"2025-04-17T19:05:27.000Z","dependencies_parsed_at":"2025-03-27T18:40:10.421Z","dependency_job_id":null,"html_url":"https://github.com/arthur-aps/jsButtonChangeDetection","commit_stats":null,"previous_names":["arthur-aps/jsbuttonchangedetection"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthur-aps%2FjsButtonChangeDetection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthur-aps%2FjsButtonChangeDetection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthur-aps%2FjsButtonChangeDetection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthur-aps%2FjsButtonChangeDetection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arthur-aps","download_url":"https://codeload.github.com/arthur-aps/jsButtonChangeDetection/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252912996,"owners_count":21824066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["change-detection","javascript","script","website"],"created_at":"2025-05-07T16:15:07.393Z","updated_at":"2025-05-07T16:15:07.989Z","avatar_url":"https://github.com/arthur-aps.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[def]: ./CHANGELOG.md\n\n## *pt-BR:*\nVeja o changelog [aqui][def]\n### JavaScript - Detector por ID de Mudanças no `href` de um Elemento em uma Página Web\n\nEu precisava detectar a mudança de um botão numa página web, então fiz esse script pra isso.\n\n### Como rodá-lo?\n\n\u003e Nota: o script usa `node.js` como backend no seu `localhost` para enviar emails quando mudanças são detectadas no elemento.\n\u003e Se você não quiser essa funcionalidade, remova `//` nas linhas `// /*` e `// */` no arquivo `script.js`.  \n\n### Backend (opcional)\n\nO arquivo `backend.js` roda o backend no seu `localhost`, esperando por uma request (requisição) para enviar emails quando mudanças\nforem detectadas.\n\nA primeira coisa que você deve fazer é criar um gmail que enviará os emails quando mudanças forem detectadas. Depois, ativar a autenticação\nmultifatorial nessa conta para habilitar senhas de app. Por fim, crie uma senha de app para essa conta buscando por \"senhas de app\" no\n[gerenciador de contas do google](https://myaccount.google.com), daí você vai conseguir usar essa conta e senha para enviar emails com\n`node.js`. Use elas no arquivo `backend.js` entrando nele e mudando os valores de `emailSender` e `pass`. Há documentação no arquivo\npara te ajudar.\n\nAgora, pro backend funcionar , antes de tudo, instale o `node` e o `npm` na sua máquina, então, instale os módulos `express`, `cors` e\n`nodemailer` usando o `npm` no seu terminal ou cmd (confira se está no diretório deste repositório quando rodar os seguintes\ncomandos):\n\n    npm install\n\nE agora que você tem os módulos instalados, use o `npm` para rodar o arquivo `backend.js` :\n\n    npm run start\n\nLegal, você tem um servidor rodando no seu `localhost` agora. Fácil, né?\n\n### Frontend\n\nO arquivo `script.js` detecta mudanças na página. Ele vai rodar no console do seu browser de preferência, na\npágina em que você rodá-lo e quiser detectar mudanças. Pra funcionar, acesse esse arquivo e:\n\n- Mude o valor de `elementID` para o ID do elemento que você quer detectar na página\n- Se você for usar a função de mandar emails, mude o valor de `emailReceiver_s` para o(s) email(s) destinatário(s) de sua preferência\n- Mude o intervalo de verificação de mudanças na função `setTimeout()` no final do arquivo\n\nHá documentação no arquivo pra ajudar na configuração.\n\nQuando tudo estiver pronto, e seu servidor backend estiver rodando (se for utilizá-lo), é só copiar e colar o código de `script.js` no console da página\nque você quiser detectar mudanças, rodar e pronto.\n\n## *en:*\nSee the changelog [here][def]\n### JavaScript - Web Page Element's `href` Change Detector by ID\n\nI needed to detect changes from a button in a web page, so I made this script to do that.\n\n### How to run the script?\n\n\u003e Note: the script uses `node.js` as backend in your `localhost` to send emails when changes are detected in the element.\n\u003e If you don't want this functionality, remove `//` in the lines `// /*` and `// */` in the file `script.js`.\n\n### Backend (optional)\n\nThe file `backend.js` runs the backend in your `localhost`, waiting for a request to send emails when changes are detected.\n\nThe first thing you want to do is create a gmail to send the emails when changes are detected, then activate multi-factor authentication\nin this account to enable app passwords. Lastly, create an app password for this account by searching for \"app password\" in\n[google's account manager](https://myaccount.google.com), then, you can use this account's user and password for sending emails with\n`node.js`. Use them in the file `backend.js`, by accessing it and changing `emailSender` and `pass` values. There's documentation\nin the file to help you.\n\nNow, for the backend to work , before anything, install `node` and `npm` in your machine. Then, install the modules `express`, `cors`\nand `nodemailer` using `npm` in your terminal or cmd (make sure you're in the folder of this repository when running the\nfollowing commands):\n\n    npm install\n\nNow that you have the modules installed, use `npm` to run the file `backend.js` :\n\n    npm run start\n\nCool, you have a server running in your `localhost` now. Easy, right?\n\n### Frontend\n\nThe file `script.js` detects the changes on the page. This file will run in the console of your browser of preference,\nin the page that you want to detect changes. For it to work, access it and:\n\n- Change the `elementID`'s value to the ID of the element you want to detect in the page\n- If you're going to use the send-email functionality, change `emailReceiver_s`'s value to the email receiver(s) of your preference\n- Change the time interval between verifications in the `setTimeout()` function at the end of the file\n\nThere's documentation in the file to help you.\n\nWhen everything's ready, and the backend server is up and running (if you're going to use it), simply copy, paste and run the `script.js` file's content into the\nconsole of the page you want to detect changes.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthur-aps%2Fjsbuttonchangedetection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farthur-aps%2Fjsbuttonchangedetection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthur-aps%2Fjsbuttonchangedetection/lists"}