mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-20 00:35:22 +00:00
fix broken scripts (#834)
This commit is contained in:
parent
04ffb1de38
commit
2960a720d5
5 changed files with 13 additions and 13 deletions
|
|
@ -11,10 +11,10 @@
|
|||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "TechArticle",
|
||||
"headline": <%= @title.to_json %>,
|
||||
"description": <%= generate_doc_description(@content, @title).to_json %>,
|
||||
"url": <%= doc_url(@doc_path).to_json %>,
|
||||
"dateModified": <%= (File.mtime(safe_docs_path("#{@doc_path}.md")).iso8601 rescue Time.current.iso8601).to_json %>,
|
||||
"headline": <%== @title.to_json %>,
|
||||
"description": <%== generate_doc_description(@content, @title).to_json %>,
|
||||
"url": <%== doc_url(@doc_path).to_json %>,
|
||||
"dateModified": <%== (File.mtime(safe_docs_path("#{@doc_path}.md")).iso8601 rescue Time.current.iso8601).to_json %>,
|
||||
"author": {
|
||||
"@type": "Organization",
|
||||
"name": "Hack Club",
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
},
|
||||
"mainEntityOfPage": {
|
||||
"@type": "WebPage",
|
||||
"@id": <%= doc_url(@doc_path).to_json %>
|
||||
"@id": <%== doc_url(@doc_path).to_json %>
|
||||
},
|
||||
"about": {
|
||||
"@type": "SoftwareApplication",
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
}
|
||||
|
||||
function updateProjectsFrame(url) {
|
||||
let baseUrl = <%= project_durations_static_pages_path.to_json %>;
|
||||
let baseUrl = <%== project_durations_static_pages_path.to_json %>;
|
||||
const params = new URLSearchParams(new URL(url).search);
|
||||
const frameUrl = baseUrl + '?' + params.toString();
|
||||
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@
|
|||
|
||||
// update content-frame url for Turbo
|
||||
const contentUrl = new URL(window.location);
|
||||
contentUrl.pathname = <%= filterable_dashboard_content_static_pages_path.to_json %>;
|
||||
contentUrl.pathname = <%== filterable_dashboard_content_static_pages_path.to_json %>;
|
||||
contentUrl.searchParams.set(param, selected.join(","));
|
||||
frame.src = contentUrl.toString();
|
||||
|
||||
|
|
|
|||
|
|
@ -238,9 +238,9 @@
|
|||
}
|
||||
|
||||
function check() {
|
||||
fetch(<%= api_v1_my_heartbeats_most_recent_path(source_type: "test_entry").to_json %>, {
|
||||
fetch(<%== api_v1_my_heartbeats_most_recent_path(source_type: "test_entry").to_json %>, {
|
||||
headers: {
|
||||
'Authorization': 'Bearer ' + <%= @current_user_api_key.to_json %>
|
||||
'Authorization': 'Bearer ' + <%== @current_user_api_key.to_json %>
|
||||
}
|
||||
})
|
||||
.then(response => response.json())
|
||||
|
|
@ -280,7 +280,7 @@
|
|||
check();
|
||||
|
||||
window.skipToNext = function() {
|
||||
window.location.href = <%= my_wakatime_setup_step_2_path.to_json %>;
|
||||
window.location.href = <%== my_wakatime_setup_step_2_path.to_json %>;
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -337,9 +337,9 @@ git clone https://github.com/wakatime/vim-wakatime.git</code></pre>
|
|||
}
|
||||
|
||||
function check() {
|
||||
fetch(<%= api_v1_my_heartbeats_most_recent_path.to_json %>, {
|
||||
fetch(<%== api_v1_my_heartbeats_most_recent_path.to_json %>, {
|
||||
headers: {
|
||||
'Authorization': 'Bearer ' + <%= @current_user_api_key.to_json %>
|
||||
'Authorization': 'Bearer ' + <%== @current_user_api_key.to_json %>
|
||||
}
|
||||
})
|
||||
.then(response => response.json())
|
||||
|
|
@ -379,7 +379,7 @@ git clone https://github.com/wakatime/vim-wakatime.git</code></pre>
|
|||
check();
|
||||
|
||||
window.skipToNext = function() {
|
||||
window.location.href = <%= my_wakatime_setup_step_4_path.to_json %>;
|
||||
window.location.href = <%== my_wakatime_setup_step_4_path.to_json %>;
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue