Sagot :
// ==UserScript==
// @name Brainly v2.0
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://brainly.com/*
// @grant none
// ==/UserScript==
function removePost(e) {
e.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.removeChild(e.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode);
}
function checkRating(rating) {
let value = parseInt(rating.innerText);
return value >= 4;
}
function filterRatings() {
if (document.querySelectorAll("div[class='sg-rate-box__rate']").length === 0) {
console.log('No answers to check.');
}
else {
var Listings = [...document.querySelectorAll("div[class='sg-rate-box__rate']")].map(listing => {
if (parseInt(listing.innerText) < 4 && parseInt(listing.innerText) != 0) {
removePost(listing);
console.log(`${listing} being removed`);
}
else {
return parseInt(listing.innerText);
}
});
console.log(Listings);
}
}
(function() {
'use strict';
filterRatings();
})();
.Answer:
8.B. goggles
9.A.claw hammer
10.B.umbrella nails
12.C. auger bit
Explanation:
Thanks hope it helps
8.B. goggles
9.A.claw hammer
10.B.umbrella nails
12.C. auger bit
Explanation:
Thanks hope it helps