├── icon.png
├── style.css
├── index.html
├── manifest.json
├── LICENSE
└── script.js
/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7bruno/audio-acelerator-for-whatsapp-web/HEAD/icon.png
--------------------------------------------------------------------------------
/style.css:
--------------------------------------------------------------------------------
1 | #audio-speed-button {
2 | border: 1.5px solid gray;
3 | border-radius: 10%;
4 | color: gray;
5 | font-weight: bold;
6 | font-size: 1.1rem;
7 | padding: 5px;
8 | }
9 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Audio Acelerator for web whatsapp
5 |
6 |
7 | Audio Acelerator
8 |
9 |
10 |
--------------------------------------------------------------------------------
/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "manifest_version": 2,
3 | "version": "0.0.1",
4 | "name": "audio acelerator",
5 | "description": "speeds up your whatsapp web audios for you",
6 | "author": "Bruno alexandre Gomes de souza",
7 | "browser_action": {
8 | "default_title": "audio acelerator",
9 | "default_popup": "index.html",
10 | "default_icon": "icon.png"
11 | },
12 | "content_scripts":[
13 | {
14 | "matches":["https://web.whatsapp.com/"],
15 | "css":["style.css"],
16 | "js":["script.js"]
17 | }
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Bruno Alexandre Gomes de souza
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/script.js:
--------------------------------------------------------------------------------
1 | const interval = setInterval(() => {
2 | const header = document.querySelector("#side header");
3 |
4 | if (header) {
5 | clearInterval(interval);
6 |
7 | const button = document.createElement("button");
8 | button.id = "audio-speed-button";
9 | button.innerHTML = "1 X";
10 |
11 | button.addEventListener("click", () => {
12 | actualSpeed = button.innerText.split(" ", 1)[0];
13 | nextSpeed = parseFloat(actualSpeed) + 0.25;
14 |
15 | const audios = document.querySelectorAll("audio");
16 |
17 | if (nextSpeed < 3.0) {
18 | audios.forEach((element) => {
19 | element.playbackRate = nextSpeed;
20 | });
21 | button.innerHTML = nextSpeed + " X";
22 | } else {
23 | audios.forEach((element) => {
24 | element.playbackRate = 1;
25 | });
26 | button.innerHTML = 1 + " X";
27 | }
28 | });
29 |
30 | header.appendChild(button);
31 |
32 | document.addEventListener("click", () => {
33 | actualSpeed = parseFloat(button.innerText.split(" ", 1)[0]);
34 | const interval2 = setInterval(() => {
35 | const audios = document.querySelectorAll("audio");
36 | if (audios || interval2 == 2000) {
37 | clearInterval(interval2);
38 | audios.forEach((element) => {
39 | element.playbackRate = actualSpeed;
40 | }, 50);
41 | }
42 | });
43 | });
44 | }
45 | }, 500);
46 |
--------------------------------------------------------------------------------