Git Product home page Git Product logo

monboncoin's People

Contributors

fdaligand avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

kkscrap

monboncoin's Issues

Change ad id

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.

unhide ad

Add an unhide button when datas of an hidden ad have change to authorize user to review the ad.

contentScript.js:348 Uncaught TypeError: Cannot read property '1' of null

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

Inform user when ad price change

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.

Save ad info into indexedDB

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)

check consistency of the code

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!");      
};

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.