mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-28 21:38:51 +03:00
Use Javascript strict mode
This commit is contained in:
parent
1c525d9c19
commit
1cb065edc6
27 changed files with 54 additions and 0 deletions
|
@ -8,6 +8,8 @@
|
||||||
<script src="scripts/lib/mootools-1.2-core-yc.js"></script>
|
<script src="scripts/lib/mootools-1.2-core-yc.js"></script>
|
||||||
<script src="scripts/lib/mootools-1.2-more.js"></script>
|
<script src="scripts/lib/mootools-1.2-more.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
'use strict';
|
||||||
|
|
||||||
window.addEvent('domready', function() {
|
window.addEvent('domready', function() {
|
||||||
var setLocationKeyboardEvents = new Keyboard({
|
var setLocationKeyboardEvents = new Keyboard({
|
||||||
defaultEventType: 'keydown',
|
defaultEventType: 'keydown',
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
<script src="scripts/lib/mootools-1.2-core-yc.js"></script>
|
<script src="scripts/lib/mootools-1.2-core-yc.js"></script>
|
||||||
<script src="scripts/lib/mootools-1.2-more.js"></script>
|
<script src="scripts/lib/mootools-1.2-more.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
'use strict';
|
||||||
|
|
||||||
var hashes = new URI().getData('hashes').split('|');
|
var hashes = new URI().getData('hashes').split('|');
|
||||||
window.addEvent('domready', function() {
|
window.addEvent('domready', function() {
|
||||||
$('cancelBtn').focus();
|
$('cancelBtn').focus();
|
||||||
|
|
|
@ -135,6 +135,8 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<script>
|
<script>
|
||||||
|
'use strict';
|
||||||
|
|
||||||
var encodedUrls = new URI().getData('urls');
|
var encodedUrls = new URI().getData('urls');
|
||||||
if (encodedUrls) {
|
if (encodedUrls) {
|
||||||
var urls = [];
|
var urls = [];
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
'use strict';
|
||||||
|
|
||||||
var hashes = new URI().getData('hashes').split('|');
|
var hashes = new URI().getData('hashes').split('|');
|
||||||
setDlLimit = function() {
|
setDlLimit = function() {
|
||||||
var limit = $("dllimitUpdatevalue").value.toInt() * 1024;
|
var limit = $("dllimitUpdatevalue").value.toInt() * 1024;
|
||||||
|
|
|
@ -23,6 +23,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
'use strict';
|
||||||
|
|
||||||
var categoriesFilterContextMenu = new CategoriesFilterContextMenu({
|
var categoriesFilterContextMenu = new CategoriesFilterContextMenu({
|
||||||
targets: '.categoriesFilterContextMenuTarget',
|
targets: '.categoriesFilterContextMenuTarget',
|
||||||
menu: 'categoriesFilterMenu',
|
menu: 'categoriesFilterMenu',
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
<script src="scripts/lib/mootools-1.2-more.js"></script>
|
<script src="scripts/lib/mootools-1.2-more.js"></script>
|
||||||
<script src="scripts/misc.js?locale=${LANG}"></script>
|
<script src="scripts/misc.js?locale=${LANG}"></script>
|
||||||
<script>
|
<script>
|
||||||
|
'use strict';
|
||||||
|
|
||||||
var newCategoryKeyboardEvents = new Keyboard({
|
var newCategoryKeyboardEvents = new Keyboard({
|
||||||
defaultEventType: 'keydown',
|
defaultEventType: 'keydown',
|
||||||
events: {
|
events: {
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
'use strict';
|
||||||
|
|
||||||
// Tabs
|
// Tabs
|
||||||
MochaUI.initializeTabs('preferencesTabs');
|
MochaUI.initializeTabs('preferencesTabs');
|
||||||
|
|
||||||
|
|
|
@ -814,6 +814,8 @@
|
||||||
<div style="text-align: center; margin-top: 1em;"><input type="button" value="QBT_TR(Save)QBT_TR[CONTEXT=HttpServer]" onclick="applyPreferences();" /></div>
|
<div style="text-align: center; margin-top: 1em;"><input type="button" value="QBT_TR(Save)QBT_TR[CONTEXT=HttpServer]" onclick="applyPreferences();" /></div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
'use strict';
|
||||||
|
|
||||||
// Downloads tab
|
// Downloads tab
|
||||||
var WatchedFoldersTable = new HtmlTable($("watched_folders_tab"));
|
var WatchedFoldersTable = new HtmlTable($("watched_folders_tab"));
|
||||||
|
|
||||||
|
|
|
@ -152,6 +152,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
'use strict';
|
||||||
|
|
||||||
torrentPeersTable.setup('torrentPeersTableDiv', 'torrentPeersTableFixedHeaderDiv', null);
|
torrentPeersTable.setup('torrentPeersTableDiv', 'torrentPeersTableFixedHeaderDiv', null);
|
||||||
var selectedTab = $(getLocalStorageItem('selected_tab', 'PropGeneralLink'));
|
var selectedTab = $(getLocalStorageItem('selected_tab', 'PropGeneralLink'));
|
||||||
if (selectedTab)
|
if (selectedTab)
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
<script src="scripts/lib/mootools-1.2-more.js"></script>
|
<script src="scripts/lib/mootools-1.2-more.js"></script>
|
||||||
<script src="scripts/misc.js?locale=${LANG}"></script>
|
<script src="scripts/misc.js?locale=${LANG}"></script>
|
||||||
<script>
|
<script>
|
||||||
|
'use strict';
|
||||||
|
|
||||||
var renameKeyboardEvents = new Keyboard({
|
var renameKeyboardEvents = new Keyboard({
|
||||||
defaultEventType: 'keydown',
|
defaultEventType: 'keydown',
|
||||||
events: {
|
events: {
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
torrentsTable = new TorrentsTable();
|
torrentsTable = new TorrentsTable();
|
||||||
torrentPeersTable = new TorrentPeersTable();
|
torrentPeersTable = new TorrentPeersTable();
|
||||||
searchResultsTable = new SearchResultsTable();
|
searchResultsTable = new SearchResultsTable();
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
var lastShownContexMenu = null;
|
var lastShownContexMenu = null;
|
||||||
var ContextMenu = new Class({
|
var ContextMenu = new Class({
|
||||||
//implements
|
//implements
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
var categories = {};
|
var categories = {};
|
||||||
var defaultSavePath = "";
|
var defaultSavePath = "";
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
|
|
||||||
**************************************************************/
|
**************************************************************/
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
var DynamicTableHeaderContextMenuClass = null;
|
var DynamicTableHeaderContextMenuClass = null;
|
||||||
var ProgressColumnWidth = -1;
|
var ProgressColumnWidth = -1;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* JS counterpart of the function in src/misc.cpp
|
* JS counterpart of the function in src/misc.cpp
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
it in the onContentLoaded function of the new window.
|
it in the onContentLoaded function of the new window.
|
||||||
|
|
||||||
----------------------------------------------------------------- */
|
----------------------------------------------------------------- */
|
||||||
|
'use strict';
|
||||||
|
|
||||||
/* Define localStorage object for older browsers */
|
/* Define localStorage object for older browsers */
|
||||||
if (typeof localStorage == 'undefined') {
|
if (typeof localStorage == 'undefined') {
|
||||||
window['localStorage'] = {
|
window['localStorage'] = {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
var ProgressBar = new Class({
|
var ProgressBar = new Class({
|
||||||
initialize: function(value, parameters) {
|
initialize: function(value, parameters) {
|
||||||
var vals = {
|
var vals = {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
var is_seed = true;
|
var is_seed = true;
|
||||||
var current_hash = "";
|
var current_hash = "";
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
var clearData = function() {
|
var clearData = function() {
|
||||||
$('time_elapsed').set('html', '');
|
$('time_elapsed').set('html', '');
|
||||||
$('eta').set('html', '');
|
$('eta').set('html', '');
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
var trackersDynTable = new Class({
|
var trackersDynTable = new Class({
|
||||||
|
|
||||||
initialize: function() {},
|
initialize: function() {},
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
var webseedsDynTable = new Class({
|
var webseedsDynTable = new Class({
|
||||||
|
|
||||||
initialize: function() {},
|
initialize: function() {},
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
<script src="scripts/lib/mootools-1.2-more.js"></script>
|
<script src="scripts/lib/mootools-1.2-more.js"></script>
|
||||||
<script src="scripts/misc.js?locale=${LANG}"></script>
|
<script src="scripts/misc.js?locale=${LANG}"></script>
|
||||||
<script>
|
<script>
|
||||||
|
'use strict';
|
||||||
|
|
||||||
var setLocationKeyboardEvents = new Keyboard({
|
var setLocationKeyboardEvents = new Keyboard({
|
||||||
defaultEventType: 'keydown',
|
defaultEventType: 'keydown',
|
||||||
events: {
|
events: {
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
<script src="scripts/lib/mootools-1.2-more.js"></script>
|
<script src="scripts/lib/mootools-1.2-more.js"></script>
|
||||||
<script src="scripts/misc.js?locale=${LANG}"></script>
|
<script src="scripts/misc.js?locale=${LANG}"></script>
|
||||||
<script>
|
<script>
|
||||||
|
'use strict';
|
||||||
|
|
||||||
var UseGlobalLimit = -2;
|
var UseGlobalLimit = -2;
|
||||||
var NoLimit = -1;
|
var NoLimit = -1;
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
'use strict';
|
||||||
|
|
||||||
//create a context menu
|
//create a context menu
|
||||||
var torrentsTableContextMenu = new TorrentsTableContextMenu({
|
var torrentsTableContextMenu = new TorrentsTableContextMenu({
|
||||||
targets: '.torrentsTableContextMenuTarget',
|
targets: '.torrentsTableContextMenuTarget',
|
||||||
|
|
|
@ -122,6 +122,8 @@
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
<script>
|
<script>
|
||||||
|
'use strict';
|
||||||
|
|
||||||
var submitted = false;
|
var submitted = false;
|
||||||
|
|
||||||
$('uploadForm').addEventListener("submit", function() {
|
$('uploadForm').addEventListener("submit", function() {
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
'use strict';
|
||||||
|
|
||||||
var hashes = new URI().getData('hashes').split('|');
|
var hashes = new URI().getData('hashes').split('|');
|
||||||
setUpLimit = function() {
|
setUpLimit = function() {
|
||||||
var limit = $("uplimitUpdatevalue").value.toInt() * 1024;
|
var limit = $("uplimitUpdatevalue").value.toInt() * 1024;
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
<link rel="stylesheet" type="text/css" href="css/login.css" />
|
<link rel="stylesheet" type="text/css" href="css/login.css" />
|
||||||
<script src="scripts/lib/mootools-1.2-core-yc.js"></script>
|
<script src="scripts/lib/mootools-1.2-core-yc.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
'use strict';
|
||||||
|
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
$('username').focus();
|
$('username').focus();
|
||||||
$('username').select();
|
$('username').select();
|
||||||
|
|
Loading…
Reference in a new issue