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

Sha512tooltip version #1312

Merged
merged 3 commits into from
Dec 8, 2017
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
3 changes: 3 additions & 0 deletions libs/modelParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,9 @@ var parseScript = function (aScript) {
parseDateProperty(script, 'updated');
parseDateProperty(script, '_since'); // Virtual

// Hash
script.hashShort = script.hash.substr(0, 7);

if (script._since && script.updated && script._since.toString() !== script.updated.toString()) {
script.isUpdated = true;
}
Expand Down
2 changes: 1 addition & 1 deletion views/pages/newScriptPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ <h5 class="panel-title">
<div id="collapse-version" class="panel-collapse collapse">
<div class="panel-body">
<p>Enables the ability to use automatic script updates in most .user.js engines.</p>
<p>Usually major dot minor dot build <em>(or Patch)</em>. May utilize the <a href="https://developer.mozilla.org/docs/Toolkit_version_format">Toolkit version format</a> or <a href="http://semver.org/">Semantic Versioning <em>(SemVer)</em></a>.</p>
<p>Usually major dot minor dot build <em>(or Patch)</em>. May utilize the <a href="https://developer.mozilla.org/docs/Toolkit_version_format">Toolkit version format</a>.</p>
<p>Last value shown.</p>
</div>
</div>
Expand Down
9 changes: 1 addition & 8 deletions views/pages/scriptPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,7 @@

<div class="script-meta">
<p><i class="fa fa-fw fa-clock-o"></i> <b>Published:</b> <time datetime="{{script._sinceISOFormat}}" title="{{script._since}}">{{script._sinceHumanized}}</time></p>
{{#script.meta.UserScript.version}}
<p><i class="fa fa-fw fa-history"></i> <b>Version:</b> <code>{{value}}</code>{{#script.isUpdated}} updated <time class="script-updated" datetime="{{script.updatedISOFormat}}" title="{{script.updated}}">{{script.updatedHumanized}}</time>{{/script.isUpdated}}</p>
{{/script.meta.UserScript.version}}
{{^script.meta.UserScript.version}}
{{#script.isUpdated}}
<p><i class="fa fa-fw fa-history"></i> <b>Updated:</b> <time class="script-updated" datetime="{{script.updatedISOFormat}}" title="{{script.updated}}">{{script.updatedHumanized}}</time></p>
{{/script.isUpdated}}
{{/script.meta.UserScript.version}}
<p><i class="fa fa-fw fa-history"></i> <b>Version:</b> <code>{{script.meta.UserScript.version.0.value}}<span title="SHA-512 {{script.hash}}">+{{script.hashShort}}</span></code>{{#script.isUpdated}} updated <time class="script-updated" datetime="{{script.updatedISOFormat}}" title="{{script.updated}}">{{script.updatedHumanized}}</time>{{/script.isUpdated}}</p>
{{#script.description}}<p><i class="fa fa-fw fa-info"></i> <b>Summary:</b> {{script.description}}</p>{{/script.description}}
{{#script.hasGroups}}
<span>
Expand Down