@tenjuu99/blog 0.2.34 → 0.2.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tenjuu99/blog",
3
- "version": "0.2.34",
3
+ "version": "0.2.35",
4
4
  "description": "blog template",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -73,9 +73,6 @@ const transition = async (href) => {
73
73
  script.remove()
74
74
  }
75
75
  })
76
- for (let k in window.after_transition) {
77
- window.after_transition[k].apply()
78
- }
79
76
  }
80
77
 
81
78
  const urlFromHref = (href) => {
@@ -102,7 +99,13 @@ const turbolinks = () => {
102
99
  if (`${url.pathname}${url.search}` === `${current.pathname}${current.search}`) {
103
100
  return;
104
101
  }
102
+ for (let k in window.turbolink_before_transition) {
103
+ window.turbolink_before_transition[k].apply()
104
+ }
105
105
  await transition(href)
106
+ for (let k in window.turbolink_after_transition) {
107
+ window.turbolink_after_transition[k].apply()
108
+ }
106
109
  history.pushState({}, '', href)
107
110
  turbolinks()
108
111
  }