Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
emilie.lecorre
lama-addons
Commits
e76b1135
Commit
e76b1135
authored
Apr 04, 2019
by
peachaku
Browse files
fix coins
parent
391fff8d
Changes
2
Hide whitespace changes
Inline
Side-by-side
js/smash/smash.js
View file @
e76b1135
...
...
@@ -57,7 +57,7 @@ SMASHLinkInserter = {
regexDoiPatternConservative
:
new
RegExp
(
'
(10
\\
.
\\
d{4,5}
\\
/[
\\
S]+[^;,.
\\
s])
'
,
'
gi
'
),
// PMID
pubmedPattern
:
new
RegExp
(
'
http.*
\\
/
\\
/.*ncbi
\\
.nlm
\\
.nih
\\
.gov.*
\\
/pubmed.*(
\\
/|=)([0-9]{4,12})
'
,
'
i
'
),
pubmedPattern
:
new
RegExp
(
'
\\
/
\\
/.*ncbi
\\
.nlm
\\
.nih
\\
.gov.*
\\
/pubmed.*(
\\
/|=)([0-9]{4,12})
'
,
'
i
'
),
pubmedGroup
:
1
,
regexPMIDPattern
:
new
RegExp
(
'
(PubMed
\\
s?(ID
\\
s?:?|:)|PM
\\
s?ID)[
\\
s:
\\
/]?
\\
s*([0-9]{4,12})
'
,
'
gi
'
),
regexPrefixPMIDPattern
:
new
RegExp
(
'
((PubMed
\\
s?(ID)?:?)|(PM
\\
s?ID))[
\\
s:
\\
/]*$
'
,
'
i
'
),
...
...
@@ -300,7 +300,7 @@ SMASHLinkInserter = {
createSpanBasedLinks
:
function
(
doc
)
{
// Detect latent OpenURL SPANS and replace them with SMASH links
var
spans
=
doc
.
getElementsByTagName
(
'
span
'
);
for
(
var
i
=
0
,
n
=
spans
.
length
;
i
<
n
;
i
++
)
{
for
(
var
i
=
0
,
n
=
spans
.
length
*
2
;
i
<
n
;
i
++
)
{
var
span
=
spans
[
i
];
var
query
=
span
.
getAttribute
(
'
title
'
);
...
...
@@ -336,7 +336,7 @@ SMASHLinkInserter = {
});
// set the added link, this will avoid an extra call to the OpenURL API and fix the access url /////////
var
a
=
document
.
createElement
(
'
a
'
);
///
a.href = resourceUrl
.replace('/original', '/pdf')
a
.
href
=
resourceUrl
a
.
target
=
'
_blank
'
;
a
.
alt
=
'
SMASH
'
;
a
.
name
=
'
SMASHLink
'
;
...
...
@@ -374,6 +374,7 @@ SMASHLinkInserter = {
},
};
function
getUserPreferences
(
callback
)
{
browser
.
storage
.
sync
.
get
({
showBolt
:
true
,
...
...
js/smash/tabBootstrapbackgroud.js
View file @
e76b1135
...
...
@@ -3,7 +3,7 @@ if (typeof chrome !== "undefined" && chrome) {
}
var
blackList
=
[
'
catalogue.univ-amu.fr
'
,
//
'catalogue.univ-amu.fr',
'
sh2hh6qx2e.search.serialssolutions.com
'
,
'
univ-amu.summon.serialssolutions.com
'
,
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment