primo-explore-unpaywall
Advanced tools
Comparing version 1.2.1 to 1.3.0
@@ -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 }, |
{ | ||
"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"> ({{$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>\ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
168440
8
276
1