fdaligand / monboncoin Goto Github PK
View Code? Open in Web Editor NEWWebExtension to rearange the visualization in leboncoin.fr
License: Apache License 2.0
WebExtension to rearange the visualization in leboncoin.fr
License: Apache License 2.0
Try to use this methods instead of old school injection script method
When user click several time in the webExtension button, button are created accordingly.
Write an user and developer doc
see GitHub page for starting.
When ad is update by the vendor, the ID change even if the ad is the same. It can be a mess if you have hide this ad before. We should find a way to create a unique ID even if ad is updated. A first idea will be to calculate the hash of image contained in the ad list and take the result as the ad ID.
identify witch test framework is best suited to test wenextensions
Add an unhide button when datas of an hidden ad have change to authorize user to review the ad.
if (img != undefined ) {
imgDataUrl = img.dataset.imgsrc;
var re = /thumbs\/([a-zA-Z0-9+=\/]*).jpg$/;
adParsed.imghash = re.exec(imgDataUrl)[1];
}
actual regex pattern doesn't return value from imgDataUrl string.
It's appear that thumbs have been replace by ad-thumbs in leboncoin server.
Find a more robust pattern to avoid this kinf of error
Through indexedDb, we can compare, at each loading of a page, if the price of an hidden ad has changed. If it's the case, we should inform user.
In order to follow the life of an ad, instead of using limited capability of localStorage, we should use indexedDb storage engine. We can save the price of an ad, from when it is online, the location of ad and many other parameter. We can propose to the end user to unhide the ad if a specific paramter has change (especially the price)
Not sure that following code act as palnned
function saveAdInfoInDB(id) {
...
var savedAd = copyAdObject(addDict[id])
var rq = obj.add(savedAd,id)//addDict[id],id);
request.onsuccess = function(event,id) {
console.log("Ad "+id+" successfuly saved in DB!");
};
function removeAdFromDB(id) {
...
var rq = obj.delete(id)//addDict[id],id);
request.onsuccess = function(event,id) {
console.log("Ad "+id+" successfuly deleted from DB!");
};
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.