Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

primo-explore-unpaywall

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

primo-explore-unpaywall - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

.DS_Store

30

features.json

@@ -9,3 +9,2 @@ {

"version": "1.2.1",
"hook": "prm-search-result-availability-line",
"config": {

@@ -23,2 +22,29 @@ "form": [

{
"key": "labelText",
"type": "input",
"templateOptions": {
"required": false,
"label": "Text/copy for the main call to action",
"placeholder": "Open Access available via unpaywall"
}
},
{
"key": "imageUrl",
"type": "input",
"templateOptions": {
"required": false,
"label": "Alternative image to display with unpaywall link",
"placeholder": "https://upload.wikimedia.org/wikipedia/commons/thumb/2/25/Open_Access_logo_PLoS_white.svg/384px-Open_Access_logo_PLoS_white.svg.png"
}
},
{
"key": "imageStyle",
"type": "input",
"templateOptions": {
"required": false,
"label": "CSS tweaking to style whatever image you've chosen",
"placeholder": "height: 24px; vertical-align: bottom; padding-right: 5px;"
}
},
{
"key": "showOnResultsPage",

@@ -41,3 +67,3 @@ "type": "select",

"templateOptions": {
"label": "(debug) Make unpaywall regardless of OA status",
"label": "(debug) Make unpaywall call regardless of OA status",
"options": [

@@ -44,0 +70,0 @@ { "name": "true", "value": true },

2

package.json
{
"name": "primo-explore-unpaywall",
"version": "1.2.1",
"version": "1.3.0",
"description": "Add 'Open Access available via unpaywall' link to search-result-avaliability-line-after in Primo New UI",

@@ -5,0 +5,0 @@ "main": "src/unpaywall.module.js",

@@ -24,3 +24,6 @@ // import npm package by name (recommended)

window.ga('send', 'event', category, action, label);
}
},
"labelText":"View Open Access Version",
"imageUrl":"https://upload.wikimedia.org/wikipedia/commons/archive/2/25/20181007070735%21Open_Access_logo_PLoS_white.svg",
"imageStyle":"width: 20px; padding-right:5px; vertical-align: middle;"
});

@@ -39,2 +39,7 @@ angular.module('bulibUnpaywall', [])

// customize UI/UX
self.labelText = (Object.keys(unpaywallConfig).includes("labelText")) ? unpaywallConfig.labelText : "Open Access available via unpaywall";
self.imageUrl = (Object.keys(unpaywallConfig).includes("imageUrl")) ? unpaywallConfig.imageUrl : null;
self.imageStyle = (Object.keys(unpaywallConfig).includes("imageStyle")) ? unpaywallConfig.imageStyle : "height: 24px; vertical-align: bottom; padding-right: 5px;";
// conditionally log to the console

@@ -123,4 +128,9 @@ self.logMessageToConsole = function (message) {

style="margin-left: 3px; margin-top: 3px;" rel="noreferrer">\
<prm-icon icon-type="svg" svg-icon-set="action" icon-definition="ic_lock_open_24px" style="color: #f68212;"></prm-icon>\
<strong>Open Access</strong> available via unpaywall\
\
<img ng-if="$ctrl.imageUrl" src="{{$ctrl.imageUrl}}" alt="unpaywall logo" style="{{$ctrl.imageStyle}}">\
<prm-icon ng-hide="$ctrl.imageUrl" icon-type="svg" svg-icon-set="action" icon-definition="ic_lock_open_24px" style="color: #f68212;"></prm-icon>\
\
<span ng-if="$ctrl.labelText">{{$ctrl.labelText}}</span>\
<span ng-hide="$ctrl.labelText"><strong>Open Access</strong> available via unpaywall</span>\
\
<span ng-if="$ctrl.showVersionLabel && $ctrl.best_oa_version">&nbsp({{$ctrl.best_oa_version}} version)</span>\

@@ -127,0 +137,0 @@ <prm-icon external-link icon-type="svg" svg-icon-set="primo-ui" icon-definition="open-in-new"></prm-icon>\

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc