summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-08-11 15:03:24 -0500
committerOmar Roth <omarroth@hotmail.com>2018-08-11 15:03:24 -0500
commitdb2c10e3a0acf460d1faf423fbbefd72a8e8490c (patch)
tree684988f8d836178e781d34b9478d3d40350c8346 /src
parent78ef6a05f011d59275bada2d2b3ea2006b47a1c6 (diff)
downloadinvidious-db2c10e3a0acf460d1faf423fbbefd72a8e8490c.tar.gz
invidious-db2c10e3a0acf460d1faf423fbbefd72a8e8490c.tar.bz2
invidious-db2c10e3a0acf460d1faf423fbbefd72a8e8490c.zip
Avoid creating temporary objects
Diffstat (limited to 'src')
-rw-r--r--src/invidious/views/preferences.ecr6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/invidious/views/preferences.ecr b/src/invidious/views/preferences.ecr
index 1afd2ce7..dea6d8b9 100644
--- a/src/invidious/views/preferences.ecr
+++ b/src/invidious/views/preferences.ecr
@@ -26,7 +26,7 @@ function update_value(element) {
<div class="pure-control-group">
<label for="speed">Default speed: </label>
<select name="speed" id="speed">
- <% [2.0, 1.5, 1.0, 0.5].each do |option| %>
+ <% {2.0, 1.5, 1.0, 0.5}.each do |option| %>
<option <% if user.preferences.speed == option %> selected <% end %>><%= option %></option>
<% end %>
</select>
@@ -35,7 +35,7 @@ function update_value(element) {
<div class="pure-control-group">
<label for="quality">Preferred video quality: </label>
<select name="quality" id="quality">
- <% ["hd720", "medium", "small"].each do |option| %>
+ <% {"hd720", "medium", "small"}.each do |option| %>
<option <% if user.preferences.quality == option %> selected <% end %>><%= option %></option>
<% end %>
</select>
@@ -50,7 +50,7 @@ function update_value(element) {
<div class="pure-control-group">
<label for="comments">Pull comments from: </label>
<select name="comments" id="comments">
- <% ["youtube", "reddit"].each do |option| %>
+ <% {"youtube", "reddit"}.each do |option| %>
<option <% if user.preferences.comments == option %> selected <% end %>><%= option %></option>
<% end %>
</select>