Removed unicode literals

This commit is contained in:
Martin Mahner 2018-04-29 12:00:00 +02:00
parent c1e39d9a7f
commit 3e88b66cfa
18 changed files with 6 additions and 31 deletions

View file

@ -3,13 +3,13 @@
// -----------------------------------------------------------------------------
// Add data-platform to the body tag to show platform related shortcuts
// -----------------------------------------------------------------------------
const isWindows = navigator.appVersion.indexOf("Win") !== -1;
const isWindows = navigator.appVersion.indexOf('Win') !== -1;
document.body.dataset.platform = isWindows ? 'win' : 'mac';
// -----------------------------------------------------------------------------
// Autofocus the content field on the homepage
// -----------------------------------------------------------------------------
const af = document.querySelector(".autofocus textarea");
const af = document.querySelector('.autofocus textarea');
if (af !== null) {
af.focus();
}
@ -19,7 +19,7 @@ if (af !== null) {
// -----------------------------------------------------------------------------
document.body.onkeydown = function(e) {
const metaKey = isWindows ? e.ctrlKey : e.metaKey;
const form = document.querySelector(".snippet-form");
const form = document.querySelector('.snippet-form');
if (form && e.keyCode === 13 && metaKey) {
form.submit();
@ -27,7 +27,6 @@ document.body.onkeydown = function(e) {
}
};
// -----------------------------------------------------------------------------
// Toggle Wordwrap
// -----------------------------------------------------------------------------
@ -89,6 +88,6 @@ if (clipboardLink && copyToClipboardField) {
clipboardLink.onclick = function(e) {
e.preventDefault();
copyToClipboardField.select();
document.execCommand("Copy");
document.execCommand('Copy');
};
}

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from django.apps import AppConfig

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
import datetime
from django import forms

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from logging import getLogger
from django.conf import settings

View file

@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

View file

@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-19 10:38
from __future__ import unicode_literals
from django.db import migrations

View file

@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11a1 on 2017-01-21 16:04
from __future__ import unicode_literals
from django.db import migrations, models

View file

@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.9 on 2018-01-07 16:03
from __future__ import unicode_literals
from django.db import migrations, models

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from random import SystemRandom
from django.conf import settings

View file

@ -1,7 +1,6 @@
# Import global settings to make it easier to extend settings.
from django.conf.global_settings import *
#==============================================================================
# Calculation of directories relative to the module location
#==============================================================================

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
import os
from logging import getLogger

View file

@ -1,5 +1,4 @@
# -*- encoding: utf-8 -*-
from __future__ import unicode_literals
from django.urls import reverse
from django.test import TestCase

View file

@ -1,5 +1,4 @@
# -*- encoding: utf-8 -*-
from __future__ import unicode_literals
from textwrap import dedent

View file

@ -1,5 +1,4 @@
# -*- encoding: utf-8 -*-
from __future__ import unicode_literals
from datetime import timedelta

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import url

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from django.conf.urls import url
from django.views.decorators.csrf import csrf_exempt

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
import datetime
import difflib
import json

View file

@ -1,5 +1,5 @@
#!/usr/bin/env python
from __future__ import unicode_literals
import sys