Browse Source

Use Javascript strict mode

adaptive-webui-19844
Chocobo1 6 years ago
parent
commit
1cb065edc6
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 2
      src/webui/www/private/addtrackers.html
  2. 2
      src/webui/www/private/confirmdeletion.html
  3. 2
      src/webui/www/private/download.html
  4. 2
      src/webui/www/private/downloadlimit.html
  5. 2
      src/webui/www/private/filters.html
  6. 2
      src/webui/www/private/newcategory.html
  7. 2
      src/webui/www/private/preferences.html
  8. 2
      src/webui/www/private/preferences_content.html
  9. 2
      src/webui/www/private/properties_content.html
  10. 2
      src/webui/www/private/rename.html
  11. 2
      src/webui/www/private/scripts/client.js
  12. 2
      src/webui/www/private/scripts/contextmenu.js
  13. 2
      src/webui/www/private/scripts/download.js
  14. 2
      src/webui/www/private/scripts/dynamicTable.js
  15. 2
      src/webui/www/private/scripts/misc.js
  16. 2
      src/webui/www/private/scripts/mocha-init.js
  17. 2
      src/webui/www/private/scripts/progressbar.js
  18. 2
      src/webui/www/private/scripts/prop-files.js
  19. 2
      src/webui/www/private/scripts/prop-general.js
  20. 2
      src/webui/www/private/scripts/prop-trackers.js
  21. 2
      src/webui/www/private/scripts/prop-webseeds.js
  22. 2
      src/webui/www/private/setlocation.html
  23. 2
      src/webui/www/private/shareratio.html
  24. 2
      src/webui/www/private/transferlist.html
  25. 2
      src/webui/www/private/upload.html
  26. 2
      src/webui/www/private/uploadlimit.html
  27. 2
      src/webui/www/public/login.html

2
src/webui/www/private/addtrackers.html

@ -8,6 +8,8 @@ @@ -8,6 +8,8 @@
<script src="scripts/lib/mootools-1.2-core-yc.js"></script>
<script src="scripts/lib/mootools-1.2-more.js"></script>
<script>
'use strict';
window.addEvent('domready', function() {
var setLocationKeyboardEvents = new Keyboard({
defaultEventType: 'keydown',

2
src/webui/www/private/confirmdeletion.html

@ -8,6 +8,8 @@ @@ -8,6 +8,8 @@
<script src="scripts/lib/mootools-1.2-core-yc.js"></script>
<script src="scripts/lib/mootools-1.2-more.js"></script>
<script>
'use strict';
var hashes = new URI().getData('hashes').split('|');
window.addEvent('domready', function() {
$('cancelBtn').focus();

2
src/webui/www/private/download.html

@ -135,6 +135,8 @@ @@ -135,6 +135,8 @@
</div>
</form>
<script>
'use strict';
var encodedUrls = new URI().getData('urls');
if (encodedUrls) {
var urls = [];

2
src/webui/www/private/downloadlimit.html

@ -22,6 +22,8 @@ @@ -22,6 +22,8 @@
<div class="clear"></div>
</div>
<script>
'use strict';
var hashes = new URI().getData('hashes').split('|');
setDlLimit = function() {
var limit = $("dllimitUpdatevalue").value.toInt() * 1024;

2
src/webui/www/private/filters.html

@ -23,6 +23,8 @@ @@ -23,6 +23,8 @@
</div>
<script>
'use strict';
var categoriesFilterContextMenu = new CategoriesFilterContextMenu({
targets: '.categoriesFilterContextMenuTarget',
menu: 'categoriesFilterMenu',

2
src/webui/www/private/newcategory.html

@ -9,6 +9,8 @@ @@ -9,6 +9,8 @@
<script src="scripts/lib/mootools-1.2-more.js"></script>
<script src="scripts/misc.js?locale=${LANG}"></script>
<script>
'use strict';
var newCategoryKeyboardEvents = new Keyboard({
defaultEventType: 'keydown',
events: {

2
src/webui/www/private/preferences.html

@ -25,6 +25,8 @@ @@ -25,6 +25,8 @@
</div>
<script>
'use strict';
// Tabs
MochaUI.initializeTabs('preferencesTabs');

2
src/webui/www/private/preferences_content.html

@ -814,6 +814,8 @@ @@ -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>
<script>
'use strict';
// Downloads tab
var WatchedFoldersTable = new HtmlTable($("watched_folders_tab"));

2
src/webui/www/private/properties_content.html

@ -152,6 +152,8 @@ @@ -152,6 +152,8 @@
</div>
<script>
'use strict';
torrentPeersTable.setup('torrentPeersTableDiv', 'torrentPeersTableFixedHeaderDiv', null);
var selectedTab = $(getLocalStorageItem('selected_tab', 'PropGeneralLink'));
if (selectedTab)

2
src/webui/www/private/rename.html

@ -9,6 +9,8 @@ @@ -9,6 +9,8 @@
<script src="scripts/lib/mootools-1.2-more.js"></script>
<script src="scripts/misc.js?locale=${LANG}"></script>
<script>
'use strict';
var renameKeyboardEvents = new Keyboard({
defaultEventType: 'keydown',
events: {

2
src/webui/www/private/scripts/client.js

@ -22,6 +22,8 @@ @@ -22,6 +22,8 @@
* THE SOFTWARE.
*/
'use strict';
torrentsTable = new TorrentsTable();
torrentPeersTable = new TorrentPeersTable();
searchResultsTable = new SearchResultsTable();

2
src/webui/www/private/scripts/contextmenu.js

@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
'use strict';
var lastShownContexMenu = null;
var ContextMenu = new Class({
//implements

2
src/webui/www/private/scripts/download.js

@ -21,6 +21,8 @@ @@ -21,6 +21,8 @@
* THE SOFTWARE.
*/
'use strict';
var categories = {};
var defaultSavePath = "";

2
src/webui/www/private/scripts/dynamicTable.js

@ -31,6 +31,8 @@ @@ -31,6 +31,8 @@
**************************************************************/
'use strict';
var DynamicTableHeaderContextMenuClass = null;
var ProgressColumnWidth = -1;

2
src/webui/www/private/scripts/misc.js

@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
'use strict';
/*
* JS counterpart of the function in src/misc.cpp
*/

2
src/webui/www/private/scripts/mocha-init.js

@ -8,6 +8,8 @@ @@ -8,6 +8,8 @@
it in the onContentLoaded function of the new window.
----------------------------------------------------------------- */
'use strict';
/* Define localStorage object for older browsers */
if (typeof localStorage == 'undefined') {
window['localStorage'] = {

2
src/webui/www/private/scripts/progressbar.js

@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
'use strict';
var ProgressBar = new Class({
initialize: function(value, parameters) {
var vals = {

2
src/webui/www/private/scripts/prop-files.js

@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
'use strict';
var is_seed = true;
var current_hash = "";

2
src/webui/www/private/scripts/prop-general.js

@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
'use strict';
var clearData = function() {
$('time_elapsed').set('html', '');
$('eta').set('html', '');

2
src/webui/www/private/scripts/prop-trackers.js

@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
'use strict';
var trackersDynTable = new Class({
initialize: function() {},

2
src/webui/www/private/scripts/prop-webseeds.js

@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
'use strict';
var webseedsDynTable = new Class({
initialize: function() {},

2
src/webui/www/private/setlocation.html

@ -9,6 +9,8 @@ @@ -9,6 +9,8 @@
<script src="scripts/lib/mootools-1.2-more.js"></script>
<script src="scripts/misc.js?locale=${LANG}"></script>
<script>
'use strict';
var setLocationKeyboardEvents = new Keyboard({
defaultEventType: 'keydown',
events: {

2
src/webui/www/private/shareratio.html

@ -9,6 +9,8 @@ @@ -9,6 +9,8 @@
<script src="scripts/lib/mootools-1.2-more.js"></script>
<script src="scripts/misc.js?locale=${LANG}"></script>
<script>
'use strict';
var UseGlobalLimit = -2;
var NoLimit = -1;

2
src/webui/www/private/transferlist.html

@ -16,6 +16,8 @@ @@ -16,6 +16,8 @@
</div>
<script>
'use strict';
//create a context menu
var torrentsTableContextMenu = new TorrentsTableContextMenu({
targets: '.torrentsTableContextMenuTarget',

2
src/webui/www/private/upload.html

@ -122,6 +122,8 @@ @@ -122,6 +122,8 @@
</fieldset>
</form>
<script>
'use strict';
var submitted = false;
$('uploadForm').addEventListener("submit", function() {

2
src/webui/www/private/uploadlimit.html

@ -22,6 +22,8 @@ @@ -22,6 +22,8 @@
<div class="clear"></div>
</div>
<script>
'use strict';
var hashes = new URI().getData('hashes').split('|');
setUpLimit = function() {
var limit = $("uplimitUpdatevalue").value.toInt() * 1024;

2
src/webui/www/public/login.html

@ -8,6 +8,8 @@ @@ -8,6 +8,8 @@
<link rel="stylesheet" type="text/css" href="css/login.css" />
<script src="scripts/lib/mootools-1.2-core-yc.js"></script>
<script>
'use strict';
window.onload = function() {
$('username').focus();
$('username').select();

Loading…
Cancel
Save