Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beta.ordbok.uib.no
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Margunn.Rauset
beta.ordbok.uib.no
Commits
6f7bbb81
Commit
6f7bbb81
authored
4 years ago
by
Ole Voldsæter
Browse files
Options
Downloads
Patches
Plain Diff
gjeninnfører plausible-tracking av klikk på artikkelreferanser
parent
3261a60e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/App.vue
+5
-2
5 additions, 2 deletions
src/App.vue
src/components/DefElement.vue
+3
-2
3 additions, 2 deletions
src/components/DefElement.vue
with
8 additions
and
4 deletions
src/App.vue
+
5
−
2
View file @
6f7bbb81
...
...
@@ -77,7 +77,7 @@ window.onpopstate = function (event) {
}
}
function
navigate_to_article
(
self
)
{
function
navigate_to_article
(
self
,
source
)
{
axios
.
get
(
api_endpoint
+
'
/
'
+
self
.
$route
.
params
.
lang
+
'
/article/
'
+
self
.
$route
.
params
.
id
)
.
then
(
function
(
response
){
self
.
article
=
response
.
data
...
...
@@ -100,6 +100,9 @@ function navigate_to_article(self) {
.
then
(
function
(
response
){
self
.
waiting_for_articles
=
false
history
.
replaceState
({
article
:
self
.
article
,
search_results
:
[],
lang
:
self
.
lang
},
''
)
if
(
source
)
{
self
.
$plausible
.
trackEvent
(
'
internal link incoming
'
,
{
props
:
{
origin
:
source
}})
}
})
}
...
...
@@ -196,7 +199,7 @@ export default {
}
else
{
this
.
article
=
{
lemmas
:
[],
body
:{
pronunciation
:
[],
definitions
:
[],
etymology
:
[]}}
this
.
waiting_for_articles
=
true
navigate_to_article
(
this
)
navigate_to_article
(
this
,
item
.
source
)
}
}
},
...
...
This diff is collapsed.
Click to expand it.
src/components/DefElement.vue
+
3
−
2
View file @
6f7bbb81
...
...
@@ -27,7 +27,7 @@ export default {
computed
:
{
unparsed
:
function
(){
let
lang
=
this
.
dictionary
let
path
_lemma
=
this
.
$route
.
params
.
lemma
let
path
=
this
.
$route
.
fullPath
return
this
.
body
.
items
.
map
(
function
(
item
){
if
(
item
.
type_
==
'
usage
'
)
return
{
type
:
item
.
type_
,
html
:
item
.
text
,
tag
:
'
mark
'
}
...
...
@@ -38,7 +38,8 @@ export default {
ref
:
'
/
'
+
lang
+
'
/
'
+
item
.
article_id
+
'
/
'
+
(
item
.
word_form
||
item
.
lemmas
[
0
].
lemma
)
+
(
item
.
definition_id
?
'
#def
'
+
item
.
definition_id
:
''
),
article_id
:
item
.
article_id
,
definition_id
:
item
.
definition_id
,
definition_order
:
item
.
definition_order
definition_order
:
item
.
definition_order
,
source
:
path
}
else
if
(
item
.
type_
==
'
pronunciation
'
)
return
{
type
:
item
.
type_
,
html
:
item
.
string
}
else
if
(
item
.
type_
==
'
superscript
'
)
return
{
type
:
item
.
type_
,
html
:
item
.
text
,
tag
:
'
sup
'
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment