Specify plugin name in REST endpoint URL

Omitting the plugin name only works when no other plugin provides a
REST endpoint with the same name.

Change-Id: I14e1d5c616d78a42ee99f4a2a474e0e74daafa3f
Signed-off-by: Edwin Kempin <ekempin@google.com>
diff --git a/src/main/resources/static/imagare.js b/src/main/resources/static/imagare.js
index acf14cf..971becf 100644
--- a/src/main/resources/static/imagare.js
+++ b/src/main/resources/static/imagare.js
@@ -22,7 +22,7 @@
       if (prefs !== null) {
         convertImageLinks(prefs);
       } else {
-        Gerrit.get('/accounts/self/preference', function(prefs) {
+        Gerrit.get('/accounts/self/' + self.getPluginName() + '~preference', function(prefs) {
           storePrefsInCookie(prefs);
           convertImageLinks(prefs);
         });