Coder Social home page Coder Social logo

Comments (7)

decembre avatar decembre commented on June 30, 2024 1

Checking only the name should not be enough:

If more users come to use the import function (and if batch import became available), i think some error can arrive:
Userstyles as a limitation for the userstyle's name and many userstyle for generic sites ( Google, YouTube...) and a same same type of change (Dark and Gray,..) can easily have a similar name, i suppose.

On greasyfork, i see many userscripts with the same name (and when i want remember them, i need add more infos if i bookmark them).
Not certain it should be a great deal, but if it possible to use another thing than title...

from userstyles.world.

Gusted avatar Gusted commented on June 30, 2024

We currently just check the style's name. I'm not sure if that is enough to prevent such issue as I don't know a clear example of this. https://github.com/userstyles-world/userstyles.world/blob/main/handlers/style/import.go#L84

from userstyles.world.

vednoc avatar vednoc commented on June 30, 2024

The warning will be "Duplicate style name". If it ends up being necessary, we could also check for equality in source code and/or other fields, but I think that having unique style names should be good enough.

Source: https://github.com/userstyles-world/userstyles.world/blob/653001fb38/models/style.go#L179

from userstyles.world.

vednoc avatar vednoc commented on June 30, 2024

can easily have a similar name, i suppose

That's why we check both the style name and the user ID. While I agree that it's not enough, it served us well thus far.

but if it possible to use another thing than title

By adding source code to the comparison, we will probably be good to go in 99.99% of the use-cases.

from userstyles.world.

Gusted avatar Gusted commented on June 30, 2024

By adding source code to the comparison, we will probably be good to go in 99.99% of the use-cases.

Wouldn't take take quite a performance hog?

from userstyles.world.

vednoc avatar vednoc commented on June 30, 2024

Wouldn't take take quite a performance hog?

Maybe. It's worth testing regardless of it being added or not.

from userstyles.world.

vednoc avatar vednoc commented on June 30, 2024

Added source code to comparison. If it ends up causing performance issues, we will revisit it.

from userstyles.world.

Related Issues (20)

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.