Anonymous avatar Anonymous committed a15d2a7

Extracted a variable.

Comments (0)

Files changed (1)

src/js/position_divs.js

 function position_divs() {
     var client_w = document.body.clientWidth ;
     var width = client_w - 780;
-    document.getElementById("js-site-name").style.left   = width / 2 + 20 + "px";
-    document.getElementById("js-site-slogan").style.left = width / 2 + 20 + "px";
+    var js_site_w_str = width / 2 + 20 + "px";
+
+    document.getElementById("js-site-name").style.left = js_site_w_str;
+    document.getElementById("js-site-slogan").style.left = js_site_w_str;
+
     // Commenting out because it no longer exists.
     // document.getElementById("js-nav-global").style.right = width / 2 - 20 + "px";
     if ( document.getElementById("right-sidebar") == null ) {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.