Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
ion-image-search
Advanced tools
An Ionic service for searching an image from the web with an endless scroll, similar to Whatsapps `Search web` feature when defining image for group.
An Ionic service for searching an image from the web with an endless scroll, similar to Whatsapps Search web
feature when defining image for group.
Will add a plunker in the future
Demo can be seen in app:
<link rel="stylesheet" href="wherever-you-put-it/ionImageSearch.css">
<script type="text/javascript" src="wherever-you-put-it/searchProviders/*Provider.js"></script>
<script type="text/javascript" src="wherever-you-put-it/ionImageSearch.js"></script>
Or just add the minified version:
<link rel="stylesheet" href="wherever-you-put-it/ionImageSearch.min.css">
<script type="text/javascript" src="wherever-you-put-it/ionImageSearch.min.js"></script>
<script src="wherever-you-put-it/ionImageSearch.config.js"></script>
ion-image-search
AngularJS module:angular.module('myApp', ['ion-image-search']);
Inject $webImageSelector and call show
to display the modal view:
$webImageSelector.show(configuration);
The show
method receives one optional parameter
The configuration attributes and default values can be found in the ionImageSearch.config.js
file
maxSuccessiveFails
- Maximum number of seccesive search fails till infinite scroll stops or moving to next service provider if array supplied (see below). default is 5
imgSize
- the size of image we want. Default is small
fileType
- the image file extension. Default is jpg
searchProviders
- An array that Specifies search providers to use.
If more than one is supplied to the array than loads from each service provider in order if service provider failed succesively the configuration value of maxSuccessiveFails
number of times.
Default out of the box is set to use Google, Bing, Flickr
in that orderYou're more than invited to extend the image provider list and even request a merge to inlarge our list of image providers with API. It is recommended the provider will conform to the existing providers structure, but it is mandatory that it will have at least the following structure:
* Constructor that will receive configuration explained above
* `query(searchText, startIndex)` - an async query method to be called to do the actual query which receives two parameters:
* searchText - the text to actually do the search with
* startIndex - the starting index for this search
* `getPageSize()` - a method which returns the number of items the query retrieves
Don't forget to enter your own keys to the different search providers. you can request them at the following locations:
Google -
Bing -
Flickr -
TBD. Currently only manually
As AngularJS itself, this module is released under the permissive MIT license. Your contributions are always welcome.
FAQs
An Ionic service for searching an image from the web with an endless scroll, similar to Whatsapps `Search web` feature when defining image for group.
We found that ion-image-search demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.