Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New plug-in for: StartPage search engine #829

Merged
merged 1 commit into from
Dec 5, 2021

Conversation

GrosPoulet
Copy link
Contributor

No description provided.

@GrosPoulet GrosPoulet merged commit 98795ed into extesy:master Dec 5, 2021
// Return JSON object corresponding to path, without using the Evil eval
// path syntax: [key1][key2][key3]...
function getJsonObjectFromPath(path) {
return new Function('return ' + spJson + path)();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GrosPoulet This is unsafe code which is banned by Mozilla, please take a look at my fix in 98a6d97

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@extesy I don't see what's wrong but i trust Mozilla, they are certainly more experts that i am 😄
I'll apply your changes to StartPage plug-in & move following functions to hoverzoom.js:

  • getJsonObjectFromPath
  • getKeysInJsonObject
  • getValuesInJsonObject

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it makes sense to move these functions to a common code since they are used across multiple plugins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants