Coder Social home page Coder Social logo

presearch-packages's Introduction

Presearch Packages

Open source instant information packages for the Presearch engine

Install

In order to install and use presearch-packages you need to have Node.js and NPM installed locally. Node.js install

$ git clone https://github.com/PresearchOfficial/presearch-packages
$ cd presearch-packages && npm install

Development

$ cd server && npm start

Development server will be available at: http://localhost:4000/

API keys

Use .env file, inside presearch-packages/server directory to store your API keys. When you will set up your API key correctly, it will be accessible inside your package main function as API_KEY.

You can copy example file .env-example and change the file name to .env

Do not push your API keys to the presearch-packages repository

Contributing

Developing a new package for the Presearch engine:

  • Fork presearch-packages and clone locally if you have not already done so
  • Create an upstream remote and sync your local copy before you branch
  • Create a new branch <username>/<packageName>
  • Always create a new branch for separate packages
  • Switch to your new branch
  • Run npm run create-package <packageName>
  • Develop and test package using local development server
  • Write good commit messages
  • Create a pull request with the packageKey in the title
  • To create a pull request you need to push your branch to the origin remote and then click on the create pull request button on Github
  • If API key(s) are required email them to [email protected] with the pull request number in the subject and the key in the body
  • Your pull request will be merged in if the package is correct and relevant
  • Email [email protected] with any questions other questions

Useful Github Contributing Guide

Package Evaluation Guide

Review Step:

Open up the pull request for the package and take a look at the file changes under the Files changed tab

You're going to need to look over these files for any malicious code

  • Look for proper indentation
  • Check for readability
    • Are variable names expressive?
    • Is it indented properly?
    • Did the author use proper syntax?
  • Check all http requests to outer api's and make sure only the data used is being returned and nothing else
  • Check any scripts being inserted for suspicious activity
  • Check the code for quality
    • Is it concise?
    • Is it effective code?
    • Are there any unnecessary steps being taken?
    • Is there repetition that could be minimized?
    • Is it built to allow easy future maintenance?
  • Check that there are no api keys or other sensitive data exposed
  • Lastly, just make sure you understand each line and what it does

Testing Step:

  • Switch to the appropriate branch and update your local repo (git pull)
  • Navigate to http://localhost:4000/{PACKAGE_NAME} and insert the appropriate query
  • Make sure everything loads and works as expected
    • If something behaves differently than described by the creator then take note of that
  • Check the console in your browsers developers menu for errors or warnings

Feedback Step:

If at any stage in this process you found an error or something was off or you have a question for the author, leave explicit, detailed comments on the pull request for the author to go through and fix.

presearch-packages's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

presearch-packages's Issues

Question about presearch packages

Hi guys,

First of all, thanks for making this project a reality.

I'm working on another presearch package and I have a crucial question:

Is it possible to import in the html part, js other than via the script tag, have you developed a method that would allow to make global scripts for the package ?

I would like the code to be centralized and I would prefer that all the js part be well separated.

Yours faithfully

Save the data from the trigger function (ex. data from API call)

Is your feature request related to a problem? Please describe.
Example, weather app: On the trigger() function I want to fetch data from the weather API provider just to check if they have some data for the query. And if they do, I want to trigger the package. But the problem is I need to call the API again in the actual package function to get the necessary data.

Describe the solution you'd like
Refactor trigger() function. I imagine that currently, the server is checking if <package> trigger() == true and if is, it's executing <package> function(). I don't know if this will be a good solution but the trigger() function can return an array or object, where the first item will be a boolean, and the second item can be a custom value. And then you will be able to read this value from the <package> function() - in this case, the data from the API

Describe alternatives you've considered

Additional context
I'm still learning JS and I don't know if I can achieve this already. I know that I can use a global variable for this but I don't think that this will be the right way to do it

Uncaught SyntaxError and Uncaught TypeError

Describe the bug
Passing the appropriate parameter in page= can cause errors like SyntaxError and Uncaught TypeError.

To Reproduce
Steps to reproduce the behavior:

  1. Go to: https://presearch.com/search?q=test&&page=%3Cscript%3E%3C/script%3E
    (type for page= as parameter: <script></script>)
  2. Check DevTools Console

Expected behavior
It's secure for mentioned case and appropriate handled.

Screenshots
Errors (DevConsole):
errors

Site view:
issue-1

Site view for smaller size (pay attention to horizontal slider):
issue-small-view

Desktop :
OS: Windows 10
Browser: Chrome (also applies to other browsers)
Version: 104

Additional context
Console:

search?q=test&&page=%3Cscript%3C/script%3E:6 **Uncaught SyntaxError**: Invalid or unexpected token (at search?q=test&&page=%3Cscript%3C/script%3E:6:15)
app.js:115 Loaded
app.js:115 **Uncaught TypeError**: Cannot read properties of undefined (reading 'split')
    at u (app.js:115:1307)
    at parcelRequire.QvaY.axios (app.js:115:1668)
    at f (app.js:1:468)
    at p (app.js:1:544)
    at parcelRequire.ElCy../css/main.scss (app.js:117:41)
    at f (app.js:1:468)
    at parcelRequire.V4IP (app.js:1:771)
    at app.js:1:1023

Info displayed on the site:

"; window.requestQuery = "test"; window.localSettings = {"x-powered-by":true,"etag":"weak","env":"production","query parser":"extended","subdomain offset":2,"trust proxy":true,"views":"/app/views","jsonp callback name":"callback","view cache":true,"view engine":"pug","title":"Presearch","PRESEARCH_DOMAIN":"https://presearch.com","GATEWAY_ADDRESS":"eu-de-1.gateway.presearch.com","OLD_PRESEARCH_DOMAIN":"https://presearch.org","PRESEARCH_ACCOUNT_DOMAIN":"https://account.presearch.com","SEARCH_PROVIDERS_DOMAIN":"https://external.presearch.com","KEYWORDS_DOMAIN":"https://keywords.presearch.com","IMGCACHE_DOMAIN":"https://img.presearch.com","lang":"pl;q=0.8"}; window.PRESEARCH_DOMAIN = "https://presearch.com"; window.PRESEARCH_ACCOUNT_DOMAIN = "https://account.presearch.com"; window.OLD_PRESEARCH_DOMAIN = "https://presearch.org";

Best wishes,

MovieInfo Package

A community package to search for movie information.

themoviedb.org (TMDB) is a user editable database for movie information from various languages. See this like IMDB that is maintained by community. TMDB provides APIs and some light weight data dumps that we can use to create cache of movie info to help the package and hit their API to get movie and cast details.

V 0.1 Features:

  • Define triggers
  • Create a process that can generate basic movie info cache files using TMDB API/data dumps. We should be able to run this periodically and update the files with latest info. Primary focus is English language movies to enable easier quality check
  • create UI layout
  • Basic searches - movies by genre - list of movies, specific movie - one move details

Feel free to suggest anything you worth adding here.

@treygrainger Can you assign this issue to me?

Please add some features: UTC time conversion to local times, Calculator, Converters...

When we search on Google.com 20:07:22 UTC they give me result back according to my country time... which is +5 Pakistan....

Like i go to an online task and they ask me " You have to wait until 2020-06-23 20:07:22 UTC " now i don't have enough brain free to go after calculation of time accourding to my local time so i simply select the UTC time and select search...

Also add a simple calculator at least ... you can add a developed one later on...
Also add some other little converters.... like one for mBTC to Stoshi or BTC convertor...
Also add a little simple converter for Crypto Tokens or Coins conversions...

Wish you all the best and best of luck... Lastly I want to say for Presearch Moderators, Developers, Staff and Stake holders teams thanks for a greater search which is finally end of big search whale... Revolution begins with your start of this project...
Thanks
Waqas Maqsood
zip:52250
+923442287790
Pakistan

Improvement for pod-header vertical-center category_name

Describe the bug
Mentioned parts are hiding.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the 'presearch.org', type something for search
    ie. https://presearch.org/results?q=Presearch
  2. Click on 'More Options' button
  3. Change browser window size to the smallest
  4. See the issue

Expected behavior
Mentioned parts still looks fine after action described above.

Screenshots
Screenshot - normal view:
image

Screenshot - smaller view (OK):
image

Screenshot - smaller view (incorrect, overlapping):
image

Screenshot - smallest view (incorrect):
image

Best wishes,
Michal

Arithmetic operator cannot be removed

Describe the bug
Arithmetic operator cannot be removed using DEL button.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://engine.presearch.org/search?q=calculator
  2. Type 2+ or 3 *
  3. Try undo last typed char (in this case: + or *)
  4. See issue

Expected behavior
Deleting arithmetic operator (+, -. *, /) is allowed, similar like currently for typed last number.

Additional context
It's a little bit similar like #124 but use case is little different.
Here user wants to remove the arithmetic mark to correct the last entered number or even change the operator (there, user accidentally entered an artitmetic wrongly and wants to easily change it).

Best wishes,

Color Picker

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

The color picker isn't working, or displaying correctly.

Increase decimal fraction, current limited to x^-2

Is your feature request related to a problem? Please describe.
Increase decimal fraction, current limited to x^-2

Describe the solution you'd like
Increase decimal fraction at least to x^-5

Describe alternatives you've considered
Increase decimal fraction at least to x^-5, google has a higher fraction, which is really helpful

Additional context
Add any other context or screenshots about the feature request here.

Change Login name

Describe the bug
At this moment, on top right is button "Register or Login", it should be "Log in".
(as an activity)

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://www.presearch.org/
  2. See on top right

Expected behavior
The mentioned name is correct.

Add bangs to Presearch

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Bangs in DuckDuckGo and Brave Search are a huge part of my workflow and Presearch is very tedious without them

Describe the solution you'd like
A clear and concise description of what you want to happen.

Add DuckDuckGo bangs to Presearch

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

The current system of picking pre-selected search engines isn't accessible through the main search bar with presearch as the default search engine, so that's not an alternative

Additional context
Add any other context or screenshots about the feature request here.

THREE SUGGESTIONS

Hi Presearch Team,
First of all, thank you for providing an alternative to Google. I really appreciate the project you guys are undertaking here.

Let me get straight to my suggestions/recomendations:

I deal with crypto during the entire day, calculating profits and checking token prices.
There are 3 things I'd love to see added to the search screen:

1) I'd love to see the search return a number with more decimals after the dot when I use the search as a calculator. Maybe 4 to 5 digits. I feel like it was like that before and I would love to have that back (maybe an option in the settings menu for those who want it?)

2) I'd love to see the screen returning a fiat currency exchange rate with other currency when both names are entered in the search screen (Example: searching for USD GBP would return the value of one US Dollar in UK Pounds)

  1. I'd like to see the search returning tables of the most viewed sports when the name of a league-competition is searched. (Example: NFL, NBA, Premier League, etc.)

That will be all.
Once again, I love the work you guys are doing and I wish you the best of luck! Thanks for listening!

Pagination doesn't work correct for greater values

Describe the bug
Pagination doesn't work correct for values greater than established (some cases, some queries).

To Reproduce
Steps to reproduce the behavior:

  1. Go to: https://presearch.com/search?q=Rubber%20duck%20debugging
  2. Scroll down and click last page - '5' in that case: https://presearch.com/search?q=Rubber%20duck%20debugging&page=5
  3. Change page value (pagination; browser URL bar) for bigger: https://presearch.com/search?q=Rubber%20duck%20debugging&page=100

You can change the searching words and experiment yourself with values.

Expected behavior
Pagination site number is underlined correctly and results are correct.

Screenshots
❌ Issue (result for page=100):
pagination-100

✅ Correct view & current page number is underlined:
pagination-5

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome (also applies to other browsers)
  • Version: 104

Additional context
In some cases, there is displayed info: Sorry, no results found..., screenshot:
no-results

Best wishes,

Doubled log in process

Describe the bug
Doubled log in process.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://www.presearch.org/
  2. Click on 'Register or Login'
  3. Resolve Captcha
  4. Type words for search
  5. See that you have to click on previous button again

Expected behavior
After succesful log in, don't have to log in again.

Add image source

Is your feature request related to a problem? Please describe.
It would be really nice to see a source of the displayed images (images tab).
It would also improve end-user security.

Repro steps:

  1. Go to: https://presearch.com/ and type searching phrase/word
  2. Click 'Images' tab
  3. See the issue - displayed photos without info about the source
    Example: https://presearch.com/search?q=eagle -> https://presearch.com/images?q=eagle

Describe the solution you'd like
Display short info about images sources, ie.: below the image.

Describe alternatives you've considered
Other way, after hover the image - display the link source of image.

Additional context
See how it looks like with Google or DuckDuckGo for instance.

Best wishes,

add % function

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

SUGGESTION: Improve Presearch's UI/UX experience.

Hello Dev Team!

Understand that things like main-net is in our priority but here are a few things that should be finished and implemented on Presearch to make it feel more modern and improve it's usability.

  • Presearch's search result page has recieved the new UI redesign, but the homepage still carries the old design on presearch.org, please implement the new UI on homepage as well from engine.presearch.org

  • Please link the privacy policy and terms of service under the page in presearch so users can get easy access to these legal documents, why does it matter? New users coming to presearch might want to know how serious we are in-terms of privacy, and they will search for our privacy policy to know more. Right now, it's harder to find it, as you will have to go on your account and do it. Please add it like other search engines have (ie: brave search).
    Capture

  • I am not very sure about this, but it seems like presearch isn't completely open source, as some parts are not open sourced yet, we should also focus on open sourcing the whole search engine, huge thing that will draw FOSS and privacy users.

  • We should completely migrate from presearch.org to ".com"

Thank you so much! Hope this can be looked into!
@treygrainger @jejopl @colinpape

Missing emoji-regex dependency

Describe the bug
When I run npm install it does not install emoji-regex. So when I try to cd server && npm start, I get an error saying that is missing module emoji-regex.

To Reproduce
Steps to reproduce the behavior:

  1. Fork a new repository and clone it to your IDE
  2. In presearch-packages, run npm install
  3. cd server && npm start
  4. Attempt to access http://localhost:4000/

Expected behavior
It should install all dependencies so that we can run the test server.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Brave
  • Version 1.31.87

Smartphone (please complete the following information):
N/A

Additional context
Just posting for reference in case other developers run into it. I imagine it will be fixed easily enough.

Provide Client TimeZone as an Input

Please pass either full request object or some details about client request to the package.

For example, to write a package that displays current time or converts time from on time zone to another, the package need to know client time zone. Using the time zone of the node that is serving the request will create issues.

To make this more extensible, add parameter of type object along with query and API Key. This will be really helpful to serve result that are location aware.

Searching ticker with $

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
Searching with a cryptocurrency's ticker works for most major coins but not for some of the smaller caps, or more ambiguous coins. BAT for example doesn't return the CoinMarketCap price info, like BTC does. (This is an awesome feature. Search with BTC and get the price data.)
Could we add to this feature, maybe a dollar sign, $BAT, $BTC, $CRO etc. returns the CoinMarketCap price data?

Packages - problem with css

bug

e. g. if you are using <h1>, and you have multi-line text, the words are overlapping. I had the same issue with my package because by default all the text inherits line-height from the body element.

Would like to use a % button

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Google Calculator has a % button that I use all the time

Describe the solution you'd like
A clear and concise description of what you want to happen.

Please add a % button.

Additional context
Add any other context or screenshots about the feature request here.

Percentage

Some results are doubled or tripled - in some cases

Describe the bug
Some results are doubled or tripled - see an example below

To Reproduce
Steps to reproduce the behavior:

  1. Go to: https://presearch.com/search?q=dehashedcom
  2. Scroll down and see results

Expected behavior
Result in this case is not doubled/tripled.

Screenshot
1

Desktop (please complete the following information):
Not applicable

Additional context
In case with "space_", query: https://presearch.com/search?q=dehashed com
It's 'just doubled', screenshot:
2

BTW in this case 'Register' info is displayed there (previous not)
BTW2 results' screenshots are in both cases from the '1st page of results'

Let search rewards be usable on the Presearch platform without any constraints.

I have nodes running on Presearch and I'm also a regular Presearch user.
What I'd really like is to stake the PRE earned from search rewards on my nodes right off the bat.

I mean Presearch did tell the community why there were constraints of 1000PRE per withdrawal, but all that doesn't make sense when it comes to transferring your tokens within the Presearch platform and being able to stake them on nodes.
You obviously know that someone who is trying to use the search rewards to stake on nodes is already quite invested in your project and he's not just another abuser.
I know the 1000 PRE withdrawal limit is changing soon, but tbh that was kinda understandable but this is a different story. Idk if this gets raised often or not.

Please explain why this is even a thing in the first place.

6 Vulnerabilities - 5 High and 1 Critical

There are multiple vulnerabilities upon doing npm install. 1 is Critical. Most are easier to fix. May be its better to fix before we add more dependencies with all upcoming packages. @jejopl @treygrainger

As per changelog, seems like mathsteps package is no longer used. But this is still appears as a dependency. This is triggering the critical vulnerability as it depends on older version of mathjs package.
image

Couple of other high vulnerabilities are also because of the same package.

All others can be fixed with `npm audit fix'

I can submit a pull request if you are okay for me to modify outside a package

Calculator error

Describe the bug
Error in default Calculator result on Presearch

To Reproduce
Search for 2.45/5 on presesarch, answer should be 0.49, gives the answer 0.49000000000000005.

Expected behavior
Should return 0.49.

Screenshots
Screenshot (17)

Desktop (please complete the following information):
Chrome browser.

Trimmed parts after # number sign/hash

Describe the bug
At this moment, typed phrase containing # number sign/hash is trimmed (Presearch set as default search engine - browser URL bar).

To Reproduce
Steps to reproduce the behavior:

  1. Launch browser like Firefox, Chrome, Brave
  2. CTRL+L (Windows OS) -> paste: "C# docs" (or common text containing #, ie.: "C# language"). In other words: search using browser URL bar (Presearch set as default search engine)
  3. Press enter (search action)
  4. Compare result with your query

Expected behavior
The result and action is correct.

Screenshots
(issue)
Example: https://presearch.com/search?q=c#%20docs
presearch-issue-hash

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome (also applies to other browsers, see above)
  • Version: 104

Additional context
The action/result is correct if searching via 'Presearch.org'.

Additional screenshot:
(here it's fine)
Example: https://presearch.com/search?q=c%23+docs

presearch-hash

URL Encoding.

Best wishes,

A way to use Template strings on the client side

Is your feature request related to a problem? Please describe.
Is there a way to use template strings `` on the client side? For example in my color picker I need to return from the trigger function some javascript code that will work on the client side.
And the problem is that I can't use template strings because trigger function is already returning a template string

Let's say that I want to log some variable on the client side.
So, here's my js code:

var x = 10
console.log(`Your score is ${x}`)

And I want to include it in my package function:

function logSomething(query){
	return `
	<script>
	    var x = 10
	    console.log(`Your score is${x}`)
	</script>
	<div id="results"></div>
	
	`
}

Obviously this will not work and the only way to do it is to change

console.log(`Your score is ${x}`)

to

console.log('Your score is ' + x)

And the next problem with using

return `<code>` 

in the main package function is that I can't easily edit/debug my code in my code editor because it treats the code inside `` as a string

obraz

crypto/fiat conversion search terms

Describe the bug
The crypto/fiat conversion search can be incorrect.

To Reproduce
image

Expected behavior
The search should be more precise.

Screenshots
See above

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Brave
  • Version: 1.36.116

Smartphone (please complete the following information):
N/A

Additional context
I built a currency converter in Nov, but it appears not to be used. I think the search was a little more precise. If you found something wrong, I would have been happy to fix but I didn't receive much feedback. I guess I'm curious why my package was not used.

I was out for a month because of covid, but other than that I have been following the project. I sent an email and created a pull request. This is the only response I got, but I assumed everything was okay:
image

I wanted to contribute because I was passionate about the project and wanted to help. It was not for fame or economic incentives but I must admit it is a little weird to see the same package built by a different developer, later on, and with less features.

I was just searching for cpus and not trying to purposefully find an issue with the new converter.

Here is part of the email I wrote to the dev team that shows some of the features:
image

Here are the results with the current converter:
image

image

image

The search term doesn't always trigger:
image
image

Trigger is not working for uppercase queries

Describe the bug
The trigger is not working for uppercase queries. For example, in star wars quotes package, when
you search for star wars quote everything is okay, but if you start with uppercase Star wars quote the package will not be loaded. The same thing is with other packages.

The simple fix is to convert the queries to lower case like that:

function trigger(query) {
  query = query.toLowerCase();
  return query === 'starwars quote' || query === 'star wars quote';
}

advertisement lag sucks

I've been enjoying presearch, but after you guys removed the super helpful links below the search bar (etherscan, coinmarketcap, etc) it devalued for me... now that the forced ad wait time has been added, i think i just wont use the platform anymore :( too inconvenient! Makes me feel like I've regressed to dial-up, waiting multiple seconds for my google search to register 😅

Change coinmarketcap to coingecko results

On results with cryptocurrencies, the first result which appear is from coinmarketcap.
As of coinmarketcap was bought from binance, i would suggest using coingecko.com

Searching phone numbers shows calculations instead

Describe the bug
When you search for a phone number say (919) 438-6966, results on the top shows result of a computation as
(919) 438-6966
395556.00

To Reproduce
Steps to reproduce the behavior:

  1. See above

Expected behavior
Not sure if phone number format should rather be recognized as phone numbers and not show mathematical calculations.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Brave
  • Version [e.g. 22] latest

My PRE id for bounty (?): 2637364

Floating decimal point issue

Describe the bug
A clear and concise description of what the bug is.

Some float operations do not result in the correct expected response.

To Reproduce
Steps to reproduce the behavior:

  1. https://engine.presearch.org/search?q=316.7-133.4

Expected behavior
A clear and concise description of what you expected to happen.

Expected output is 183.3; returned output is 183.29999999999998

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Brave
  • Version: 1.30.87

Additional context
Add any other context about the problem here.

Back to the first pagination site at least

Is your feature request related to a problem? Please describe.
At this moment pagination elements don't have an options like: "Go back to the first / last page".

Describe the solution you'd like
Add at least one button - which allows you to go back to the first page instead of clicking via pages.

Describe alternatives you've considered
It would be also nice to add a second button for the last page or similar.

Additional context
If you're in the '10th site' &page=10 you have to click on the number 4 if you want go back to the first site using this method.
Screenshots:
site10
site4

It will be a great convenience.

Best wishes,

Wikipedia Info Box is Glitched

Describe the bug
Wikipedia info box provides a link that is defective.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://testnet-engine.presearch.org/search?q=kyle+rittenhouse
  2. Check the Wikipedia link on the info box
  3. See that it hyperlinks to a non-existent Wikipedia page http://en.wikipedia.org/wiki%2

Expected behavior
It should navigate to the correct Wikipedia link for that page https://en.wikipedia.org/wiki/Kenosha_unrest_shooting

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):

  • OS: Windows 10 21 H2
  • Browser [e.g. chrome, safari]: Brave Browser 1.31.91

Weather package is too eager

Describe the bug
The weather package appears when it isn't relevant

To Reproduce

  1. Search "windows server 2022
  2. Observe weather results for "Zorkot-Server, Khowst, Afghanistan" at top of page

Expected behavior
Search results don't include weather package

Desktop

  • OS: Windows 10
  • Browser: Firefox w/ Presearch plugin
  • Version: 104.0b10 (64-bit)

Can't change arithmetic operator

Describe the bug
Can't change arithmetic operator after enter it.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://engine.presearch.org/search?q=calculator
  2. Type 2+ (but you wanted type 2*)
  3. Click on '*' button to change
  4. See issue

Expected behavior
Last typed arithmetic operator can be easly changed before typing next numbers.

Additional context
It's a little bit similar like #123 but use case is little different. Here user accidentally entered an artitmetic wrongly and wants to easily change it (there, user wants to remove the arithmetic mark to correct the last entered number).

Best wishes,

map package issue

Describe the bug
A clear and concise description of what the bug is.

The top of the page just shows the word map, not working.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Precission of math package is limited to two decimal positions

A calculation like:

0.002 / 16

shows 0.00 in browser (due to excessive limited decimal), when with at least 8 decimals, should be:

0,000125

Problematic lines can be these:

   return `
    <div class="mainCol mathContain">
      <p class="firstDigts">${query}</p>
      <h1>${typeof data === "number" ? data.toFixed(2): ``}</h1>
      ${data && data.value ? `<h1>${data.value.toFixed(2)}</h1>\` : ``}
    </div>`

in math package, file index.js

Should be easy to return a better precission (at least 8 positions, with proper rounding).

Weird view of search results

Describe the bug
From time to time, after typing some words for search (with Presearch on search bar set as default), there are a HTML structures in results.

To Reproduce
Steps to reproduce the behavior:

Type words for search
See the results with 'HTML structure

Example (typed 'medytacja wiki'):

Medytacja – Wikipedia, wolna encyklopedia
pl.wikipedia.org/wiki/Medytacja
<a href="#" aria-label="Opcje wyników" aria-expanded="false" aria-haspopup="true" role="button" jsaction=" (...) jsaction="keydown:Xiq7wd;mouseover:pKPowd;mouseout:O9KS" data-ved="(...) l">Kopia
<a href="/search?q=related:https://pl.wikipedia.org/wiki/Medytacja_mindfulness+medytacja+wiki&sa=X&ved=(...) >Podobne

Expected behavior
The result is readable.

Desktop (please complete the following information):
1.32.115 Chromium 96.0
Windows 10

Cyrpto banner at top of coin searches in Dsearch

The banner that Dsearch displays before search results when I type in "Dogecoin" is wonderful. Great stuff.

I'd also like this for sports. Please type in "premier league" into google and see the banner display that google shows before the search results that has match results, statistics, the table, etc. It would be great to have that on Dsearch.

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.