Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

canonicalize WebKit version inside findSafariVersion.

  • Loading branch information...
commit 9f4a65fba9d0f1e43e5ea86713f00ed66523ff93 1 parent e647d4d
Masataka Yakura authored May 03, 2012
2  manifest.json
... ...
@@ -1,6 +1,6 @@
1 1
 {
2 2
     "name": "Dicentra",
3  
-    "version": "0.4",
  3
+    "version": "0.4.1",
4 4
     "description": "enhances WebKit changeset page.",
5 5
     "manifest_version": 2,
6 6
 
9  wkversion.js
@@ -6,6 +6,7 @@
6 6
      * @return {number} revision number
7 7
      */
8 8
     var getWebKitRevision = function (url) {
  9
+
9 10
         var regChangeset = /^https?:\/\/trac\.webkit\.org\/changeset\/(\d+)$/;
10 11
         if (regChangeset.test(url)) {
11 12
             return parseInt(regChangeset.exec(url).slice(1), 10);
@@ -83,6 +84,9 @@
83 84
      * @return {string} the Safari version number in which feature might be available with the associated WebKit Version
84 85
      */
85 86
     var findSafariVersion = function (version) {
  87
+
  88
+        version = canonicalizeWebKitVersion(version);
  89
+
86 90
         var safari = [
87 91
             { "product": "5.1", "webkit" : "534.55.3" },
88 92
             { "product": "5.0", "webkit" : "534.22.3" },
@@ -90,7 +94,7 @@
90 94
             { "product": "4.0", "webkit" : "531.22.7" },
91 95
             { "product": "3.2", "webkit" : "525.28" },
92 96
             { "product": "3.1", "webkit" : "525.21" },
93  
-            { "product": "3.0", "webkit" : "523.10" },
  97
+            { "product": "3.0", "webkit" : "523.10" }
94 98
         ];
95 99
         var i = 0,
96 100
             l = safari.length,
@@ -114,8 +118,7 @@
114 118
      * @param {string} version WebKit version string
115 119
      */
116 120
     var updateChangesetHeading = function (version) {
117  
-        var canoVersion = canonicalizeWebKitVersion(version);
118  
-        var safariVersion = findSafariVersion(canoVersion);
  121
+        var safariVersion = findSafariVersion(version);
119 122
         document.querySelector('h1').textContent += ' (' + version + ' / Safari ' + safariVersion + ')';
120 123
     };
121 124
 

0 notes on commit 9f4a65f

Please sign in to comment.
Something went wrong with that request. Please try again.