Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrozenberg committed Jan 21, 2020
1 parent 54efd3f commit ddee5df
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tools/experiments/experiments.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,18 +147,22 @@ function build() {
const rtvInput = document.getElementById('rtv');
const rtvButton = document.getElementById('rtv-submit');
rtvInput.addEventListener('input', () => {
rtvButton.disabled = !(rtvInput.value == '' || RTV_PATTERN.test(rtvInput.value));
rtvButton.disabled = !(
rtvInput.value == '' || RTV_PATTERN.test(rtvInput.value)
);
rtvButton.textContent = rtvInput.value == '' ? 'opt-out' : 'opt-in';
});
rtvButton.addEventListener('click', () => {
if (rtvInput.value == '') {
showConfirmation_(
'Do you really want to opt OUT of specific RTV',
setAmpCanaryCookie_.bind(null, AMP_CANARY_COOKIE.DISABLED));
setAmpCanaryCookie_.bind(null, AMP_CANARY_COOKIE.DISABLED)
);
} else if (RTV_PATTERN.test(rtvInput.value)) {
showConfirmation_(
`Do you really want to opt into the specific RTV ${rtvInput.value}?`,
setAmpCanaryCookie_.bind(null, rtvInput.value));
setAmpCanaryCookie_.bind(null, rtvInput.value)
);
}
});

Expand Down

0 comments on commit ddee5df

Please sign in to comment.