Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Fixes #35890 - enable harmony mode with Uglifier to use ES6 syntax" #9594

Merged
merged 1 commit into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ $(function() {

// Prevents all links with the disabled attribute set to "disabled"
// from being clicked.
const handleDisabledClick = (event, element) => {
const disabled = element.disabled || $(element).attr('disabled') === 'disabled';
var handleDisabledClick = function(event, element){
var disabled = element.disabled || $(element).attr('disabled') === 'disabled';
if (disabled) event.preventDefault();
return !disabled;
}
Expand Down
3 changes: 2 additions & 1 deletion app/assets/javascripts/hidden_values.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ function hidden_value_control() {
});
}

function replace_value_control(link, tag_type = a) {
function replace_value_control(link, tag_type) {
var tag_type = tag_type || 'a'
var link = $(link);
link
.find('.glyphicon')
Expand Down
6 changes: 4 additions & 2 deletions app/assets/javascripts/hosts.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ $(document).on('ContentLoad', function() {
$('#build-review').click();
});

const action_buttons = $('.btn-toolbar a')
var action_buttons = $('.btn-toolbar a')
.not('.dropdown-toggle')
.not('.dropdown-toggle > a');
var wait_msg = $('#processing_message');
Expand All @@ -40,7 +40,9 @@ $(document).on('ContentLoad', function() {
show: false,
});

const is_in_array = (val, arr) => arr.indexOf(val) > -1;
var is_in_array = function(val, arr) {
return arr.indexOf(val) > -1;
};

action_buttons.on('click', function() {
if (this.id === 'delete-button' && !confirm($(this).attr('data-message')))
Expand Down
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
config.public_file_server.enabled = ENV.fetch('RAILS_SERVE_STATIC_FILES', false) == 'true'

# Compress JavaScripts and CSS.
config.assets.js_compressor = Uglifier.new(harmony: true)
config.assets.js_compressor = :uglifier
# config.assets.css_compressor = :sass

# Do not fallback to assets pipeline if a precompiled asset is missed.
Expand Down