Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix more link w/HTTPS. Close #570 #574

Merged
merged 1 commit into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions lib/html/includes.js
Original file line number Diff line number Diff line change
Expand Up @@ -1240,11 +1240,8 @@ var _MiniProfiler = (function() {
return options.path + "flamegraph?id=" + id;
},
moreUrl: function moreUrl(requestName) {
var requestParts = requestName.split(" ");
var linkSrc =
requestParts[0] == "GET" ? requestParts[1] : window.location.href;
var linkSuffix = linkSrc.indexOf("?") > 0 ? "&pp=help" : "?pp=help";
return linkSrc + linkSuffix;
var linkSuffix = requestName.indexOf("?") > 0 ? "&pp=help" : "?pp=help";
return requestName + linkSuffix;
},
getClientTimings: function getClientTimings(clientTimings) {
var list = [];
Expand Down
2 changes: 1 addition & 1 deletion lib/html/includes.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@

<script id="linksTemplate" type="text/x-dot-tmpl">
<a href="{{= MiniProfiler.shareUrl(it.page.id) }}" class="profiler-share-profiler-results" target="_blank">share</a>
<a href="{{= MiniProfiler.moreUrl(it.timing.name) }}" class="profiler-more-actions">more</a>
<a href="{{= MiniProfiler.moreUrl(it.page.name) }}" class="profiler-more-actions">more</a>
{{? it.page.has_flamegraph}}
<a href="{{= MiniProfiler.flamegraphUrl(it.page.id) }}" class="profiler-show-flamegraph" target="_blank">flamegraph</a>
{{?}}
Expand Down
2 changes: 1 addition & 1 deletion lib/html/vendor.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var out=' <div class="profiler-result"> <div class="profiler-button ';if(it.has_
}
MiniProfiler.templates["linksTemplate"] = function anonymous(it
) {
var out=' <a href="'+( MiniProfiler.shareUrl(it.page.id) )+'" class="profiler-share-profiler-results" target="_blank">share</a> <a href="'+( MiniProfiler.moreUrl(it.timing.name) )+'" class="profiler-more-actions">more</a> ';if(it.page.has_flamegraph){out+=' <a href="'+( MiniProfiler.flamegraphUrl(it.page.id) )+'" class="profiler-show-flamegraph" target="_blank">flamegraph</a> ';}out+=' ';if(it.custom_link){out+=' <a href="'+( it.custom_link )+'" class="profiler-custom-link" target="_blank">'+( it.custom_link_name )+'</a> ';}out+=' ';if(it.page.has_trivial_timings){out+=' <a class="profiler-toggle-trivial" data-show-on-load="'+( it.page.has_all_trivial_timings )+'" title="toggles any rows with &lt; '+( it.page.trivial_duration_threshold_milliseconds )+' ms"> show trivial </a> ';}return out;
var out=' <a href="'+( MiniProfiler.shareUrl(it.page.id) )+'" class="profiler-share-profiler-results" target="_blank">share</a> <a href="'+( MiniProfiler.moreUrl(it.page.name) )+'" class="profiler-more-actions">more</a> ';if(it.page.has_flamegraph){out+=' <a href="'+( MiniProfiler.flamegraphUrl(it.page.id) )+'" class="profiler-show-flamegraph" target="_blank">flamegraph</a> ';}out+=' ';if(it.custom_link){out+=' <a href="'+( it.custom_link )+'" class="profiler-custom-link" target="_blank">'+( it.custom_link_name )+'</a> ';}out+=' ';if(it.page.has_trivial_timings){out+=' <a class="profiler-toggle-trivial" data-show-on-load="'+( it.page.has_all_trivial_timings )+'" title="toggles any rows with &lt; '+( it.page.trivial_duration_threshold_milliseconds )+' ms"> show trivial </a> ';}return out;
}
MiniProfiler.templates["timingTemplate"] = function anonymous(it
) {
Expand Down
2 changes: 1 addition & 1 deletion lib/mini_profiler/asset_version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true
module Rack
class MiniProfiler
ASSET_VERSION = '35a79b300ab5afa978cb59af0b05e059'
ASSET_VERSION = '90a68676a0c0d704b4438ca3f27d46c4'
end
end