When using PolyGerrit, move "Find Owners" button out of the 'MORE' list.

Change-Id: Id0051ab6f6e492d927f99d1329a7d809ed3e514e
diff --git a/src/main/resources/static/find-owners.js b/src/main/resources/static/find-owners.js
index 0abdabe..a0811ce 100644
--- a/src/main/resources/static/find-owners.js
+++ b/src/main/resources/static/find-owners.js
@@ -505,6 +505,18 @@
     }
     return true; // Okay to submit.
   }
+  var hasPolyGerritButton = false;
+  function onShowChangePolyGerrit(change, revision) {
+    var changeActions = self.changeActions();
+    // Hide previous 'Find Owners' button under 'MORE'.
+    changeActions.setActionHidden('revision', 'find-owners~find-owners', true);
+    if (!hasPolyGerritButton) {
+      var key = changeActions.add('revision', 'Find Owners');
+      changeActions.addTapListener(key,
+          () => popupFindOwnersPage(null, change, revision, false));
+      hasPolyGerritButton = true;
+    }
+  }
   function onClick(e) {
     if (pageDiv.style.visibility != 'hidden' && !useContextPopup) {
       var x = event.clientX;
@@ -522,6 +534,10 @@
   } else {
     console.log('WARNING, no handler for the Find Owners button');
   }
+  // When using PolyGerrit, move "Find Owners" button out of the 'MORE' list.
+  if (window.Polymer) {
+    self.on('showchange', onShowChangePolyGerrit);
+  }
   // When the "Submit" button is clicked, call onSubmit.
   self.on('submitchange', onSubmit);
   // Clicks outside the pop up window should close the window.