From bd2c8b67cae67419e9a7246bd8ad8e4872e83845 Mon Sep 17 00:00:00 2001 From: Alipoodle Date: Sun, 28 Jul 2019 14:52:36 +0100 Subject: [PATCH 1/6] Initial Addition of Store info Initially addition of Store info. Includes Page, and Basic function in the Create bug page. Things that need to be worked on, is the helping for getting version for each device. Windows is done for Win10 + Win8 (with a method that works on Win7) All other devives have the pop-up open but do nothing. --- edit.html | 2 + index.html | 2 + js/bugreport.js | 61 +++++++++++++--- storeinfo.html | 189 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 242 insertions(+), 12 deletions(-) create mode 100644 storeinfo.html diff --git a/edit.html b/edit.html index ce592d7..9554374 100644 --- a/edit.html +++ b/edit.html @@ -29,12 +29,14 @@
  • +
  • diff --git a/index.html b/index.html index ca0f507..7aeeca9 100644 --- a/index.html +++ b/index.html @@ -29,12 +29,14 @@
  • +
  • diff --git a/js/bugreport.js b/js/bugreport.js index 34fda6c..290f50f 100644 --- a/js/bugreport.js +++ b/js/bugreport.js @@ -26,6 +26,22 @@ var field_data = { } }; +var info = localStorage.getItem('storeinfo'); +try { + info = JSON.parse(info); +} catch (e) { + info = false; +} +if (!info) { + info = { + "w": "", + "i": "", + "a": "", + "m": "", + "l": "" + }; +} + var mm = { dark: { d: "Light Mode", @@ -43,6 +59,10 @@ function updateSyntax() { var actual = $('#act-field').val(); var client = $('#client-field').val(); var system = $('#sys-field').val(); + var storeinfo = system.match(/(?:\B)-(l|m|w|a|i)(?:\b)/i); + if (storeinfo && storeinfo[1]) { + system = system.replace('-' + storeinfo[1], info[storeinfo[1]]); + } var steps = ''; var bugtext = ''; for (var i = 1; i <= window.sct; i++) { @@ -123,6 +143,14 @@ function updateField(event) { } } +function updateInfo() { + $('input[id*="-info"]').each(function(i, item) { + var device = item.id.substring(0,1); + info[device] = item.value; + }); + localStorage.setItem('storeinfo', JSON.stringify(info)); +} + function loadTheme() { var light = false; if (typeof(Storage) !== 'undefined') { @@ -171,19 +199,28 @@ function pageLoad(page) { cb_btn = '#edit-copy-btn'; st = '#edit-syntax'; break; + case "storeinfo": + $('div#content').on('blur', 'input[id*="-info"]', updateInfo); + $('input[id*="-info"]').each(function(i, item) { + var device = item.id.substring(0,1); + item.value = info[device]; + }) + break; + } + if (cb_btn !== '' && st !== '') { + var cb = new ClipboardJS(cb_btn, { + text: function(trigger) { + return $(st).text(); + } + }); + cb.on('success', function(e) { + $(e.trigger).html('Copied'); + ga('send', 'event', 'syntax', 'copy'); + setTimeout(function() { + $(e.trigger).html('Copy'); + }, 2000); + }); } - var cb = new ClipboardJS(cb_btn, { - text: function(trigger) { - return $(st).text(); - } - }); - cb.on('success', function(e) { - $(e.trigger).html('Copied'); - ga('send', 'event', 'syntax', 'copy'); - setTimeout(function() { - $(e.trigger).html('Copy'); - }, 2000); - }); $('body').on('click', 'a[id*="switch-"]', switchMode); if (loadTheme()) { switchMode(); diff --git a/storeinfo.html b/storeinfo.html new file mode 100644 index 0000000..dd9fcc0 --- /dev/null +++ b/storeinfo.html @@ -0,0 +1,189 @@ + + + + + + + Unofficial Discord Bug Syntax Tool + + + + + + + + + + +
    +
    + + +
    +
    + +
    +

    +
    +
    Store Info
    +
    + Notice: +

    Information is stored locally to your Device and not on any of our servers.

    +
    + + +

    This is the Windows and version you are running. Example: Windows 10 64x, Version 1903. (help)

    + + + +

    This is the Mac computer and version you are running. Example: Early 2015 Macbook Pro Retina, macOS Sierra 10.12.6. (help)

    + + + +

    This is the Linux distro and version you are running. Example: Ubuntu 18.04. (help)

    + + + +

    This is the Phone you are running, and the Android version you are running. Example: Pixel 3, Android 9. (help)

    + + + +

    This is the Device you are running, and the iOS version you are running. Example: iPhone XR iOS 12.3.1. (help)

    + + +
    + + +
    +

    Finding your Microsoft Windows Version

    +
    +
    Both
    +
    +
      +
    • Press the Windows logo key + R.
    • +
    • Type winver in the Open box, and then select OK.
    • +
    • At the top will show which Windows you are running, and the second line of the body will show the Version you are running.
    • +
    +
    +
    Windows 10
    +
    +
      +
    • Open the Start menu, Settings, System, About. Alternatively you can click here to open it directly.
    • +
    • Scroll down to Windows Specification.
    • +
    • Edition is the Windows you are running and Version is the version of Windows you are running on.
    • +
    +
    +
    Windows 8
    +
    +
      +
    • If you're using a touch device, swipe in from the right edge of the screen, tap Settings, and then tap Change PC settings. Continue to step 3.
    • +
    • If you're using a mouse, point to the lower-right corner of the screen, move the mouse pointer up, click Settings, and then click Change PC settings.
    • +
    • Select PC and devices, PC info.
    • +
    • Under the Windows Header you will see the Edition of Windows you are running.
    • +
    +
    +
    + +
    + +
    +

    Finding your Mac Version

    +
    +
    TITLE
    +
    +
      +
    • INFO
    • +
    • MORE INFO
    • +
    • LITTLE BIT MORE
    • +
    +
    +
    + +
    + +
    +

    Finding your Linux Version

    +
    +
    TITLE
    +
    +
      +
    • INFO
    • +
    • MORE INFO
    • +
    • LITTLE BIT MORE
    • +
    +
    +
    + +
    + +
    +

    Finding your Android Version

    +
    +
    TITLE
    +
    +
      +
    • INFO
    • +
    • MORE INFO
    • +
    • LITTLE BIT MORE
    • +
    +
    +
    + +
    + +
    +

    Finding your iOS Version

    +
    +
    TITLE
    +
    +
      +
    • INFO
    • +
    • MORE INFO
    • +
    • LITTLE BIT MORE
    • +
    +
    +
    + +
    + + + + + + + + From 56718732ebbf17dc5c8f7e245f49d110e29c1e4c Mon Sep 17 00:00:00 2001 From: Alipoodle M Date: Fri, 2 Aug 2019 11:26:55 +0100 Subject: [PATCH 2/6] Add checks for localstorage Added checks for if browser supports localstorage. If not, currently it will alert them opening the page, but should probably do something else instead. Added a function for other stuff for the loading of the storeinfo page. --- js/bugreport.js | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/js/bugreport.js b/js/bugreport.js index 290f50f..f31e7ea 100644 --- a/js/bugreport.js +++ b/js/bugreport.js @@ -25,13 +25,13 @@ var field_data = { al: "ss" } }; - -var info = localStorage.getItem('storeinfo'); -try { - info = JSON.parse(info); -} catch (e) { - info = false; +var info = false; +if (typeof(Storage) !== 'undefined') { + info = localStorage.getItem('storeinfo'); + try { info = JSON.parse(info); } + catch (e) { } } + if (!info) { info = { "w": "", @@ -53,6 +53,16 @@ var mm = { } }; +function infoload() { + $('input[id*="-info"]').each(function(i, item) { + var device = item.id.substring(0,1); + item.value = info[device]; + }); + if (typeof(Storage) !== 'undefined') { + alert('This web browser does no support localstorage. Store info will not function!'); + } +} + function updateSyntax() { var desc = $('#desc-field').val(); var expected = $('#exp-field').val(); @@ -144,11 +154,13 @@ function updateField(event) { } function updateInfo() { - $('input[id*="-info"]').each(function(i, item) { - var device = item.id.substring(0,1); - info[device] = item.value; - }); - localStorage.setItem('storeinfo', JSON.stringify(info)); + if (typeof(Storage) !== 'undefined') { + $('input[id*="-info"]').each(function(i, item) { + var device = item.id.substring(0,1); + info[device] = item.value; + }); + localStorage.setItem('storeinfo', JSON.stringify(info)); + } } function loadTheme() { @@ -200,11 +212,8 @@ function pageLoad(page) { st = '#edit-syntax'; break; case "storeinfo": + infoload(); $('div#content').on('blur', 'input[id*="-info"]', updateInfo); - $('input[id*="-info"]').each(function(i, item) { - var device = item.id.substring(0,1); - item.value = info[device]; - }) break; } if (cb_btn !== '' && st !== '') { From 9a74674ede2b9fd6689ad91873812c83252b8661 Mon Sep 17 00:00:00 2001 From: Alipoodle Date: Sat, 3 Aug 2019 20:10:12 +0100 Subject: [PATCH 3/6] Added storeinfo on edit + find Android version - Added sys settings for edit. - Added Android Help in Store info - Added a few emojis for better readability, might need some work for screen readers... Although I don't know how they work to help with emojis if needed. --- js/bugreport.js | 20 +++++++++++++------- storeinfo.html | 25 +++++++++++++------------ 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/js/bugreport.js b/js/bugreport.js index 290f50f..e877f9d 100644 --- a/js/bugreport.js +++ b/js/bugreport.js @@ -34,11 +34,11 @@ try { } if (!info) { info = { - "w": "", - "i": "", - "a": "", - "m": "", - "l": "" + 'w': '', + 'i': '', + 'a': '', + 'm': '', + 'l': '' }; } @@ -59,7 +59,7 @@ function updateSyntax() { var actual = $('#act-field').val(); var client = $('#client-field').val(); var system = $('#sys-field').val(); - var storeinfo = system.match(/(?:\B)-(l|m|w|a|i)(?:\b)/i); + var storeinfo = system.match(/(?:\B)-(w|m|l|a|i)(?:\b)/i); if (storeinfo && storeinfo[1]) { system = system.replace('-' + storeinfo[1], info[storeinfo[1]]); } @@ -114,6 +114,12 @@ function updateEditSyntax() { } } else { edit_val = $('#' + edit_type + '-field').val(); + if (edit_type == 'sys') { + var storeinfo = edit_val.match(/(?:\B)-(w|m|l|a|i)(?:\b)/i); + if (storeinfo && storeinfo[1]) { + edit_val = edit_val.replace('-' + storeinfo[1], info[storeinfo[1]]); + } + } alias = field_data[edit_type].al; } var edit_txt = ''; @@ -204,7 +210,7 @@ function pageLoad(page) { $('input[id*="-info"]').each(function(i, item) { var device = item.id.substring(0,1); item.value = info[device]; - }) + }); break; } if (cb_btn !== '' && st !== '') { diff --git a/storeinfo.html b/storeinfo.html index dd9fcc0..62caeab 100644 --- a/storeinfo.html +++ b/storeinfo.html @@ -57,11 +57,11 @@
    Store Info
    -

    This is the Mac computer and version you are running. Example: Early 2015 Macbook Pro Retina, macOS Sierra 10.12.6. (help)

    +

    This is the Mac computer and version you are running. Example: Early 2015 Macbook Pro Retina, macOS Sierra 10.12.6.

    -

    This is the Linux distro and version you are running. Example: Ubuntu 18.04. (help)

    +

    This is the Linux distro and version you are running. Example: Ubuntu 18.04.

    @@ -69,19 +69,19 @@
    Store Info
    -

    This is the Device you are running, and the iOS version you are running. Example: iPhone XR iOS 12.3.1. (help)

    +

    This is the Device you are running, and the iOS version you are running. Example: iPhone XR iOS 12.3.1.

    - +

    Finding your Microsoft Windows Version

    Both
      -
    • Press the Windows logo key + R.
    • +
    • Press the Windows logo key + R.
    • Type winver in the Open box, and then select OK.
    • At the top will show which Windows you are running, and the second line of the body will show the Version you are running.
    @@ -89,7 +89,7 @@

    Finding your Microsoft Windows Version

    Windows 10
      -
    • Open the Start menu, Settings, System, About. Alternatively you can click here to open it directly.
    • +
    • Open the Start menu, Settings, System, About. Alternatively you can click here to open it directly.
    • Scroll down to Windows Specification.
    • Edition is the Windows you are running and Version is the version of Windows you are running on.
    @@ -97,8 +97,8 @@

    Finding your Microsoft Windows Version

    Windows 8
      -
    • If you're using a touch device, swipe in from the right edge of the screen, tap Settings, and then tap Change PC settings. Continue to step 3.
    • -
    • If you're using a mouse, point to the lower-right corner of the screen, move the mouse pointer up, click Settings, and then click Change PC settings.
    • +
    • If you're using a touch device, swipe in from the right edge of the screen, tap Settings, and then tap Change PC settings. Continue to step 3.
    • +
    • If you're using a mouse, point to the lower-right corner of the screen, move the mouse pointer up, click Settings, and then click Change PC settings.
    • Select PC and devices, PC info.
    • Under the Windows Header you will see the Edition of Windows you are running.
    @@ -146,12 +146,13 @@

    Finding your Linux Version

    Finding your Android Version

    -
    TITLE
    +
    All
      -
    • INFO
    • -
    • MORE INFO
    • -
    • LITTLE BIT MORE
    • +
    • Open Settings app.
    • +
    • Scroll down to the bottom and Select About Phone.
    • +
    • On some devices you will need to click an additional menu of Software Info.
    • +
    • There should be an item called Android Version.
    From f7b76380e540a36b03b4b8805153802aa97bb997 Mon Sep 17 00:00:00 2001 From: Alipoodle Date: Sat, 3 Aug 2019 20:16:59 +0100 Subject: [PATCH 4/6] Fix alert for lack of store info not working. --- js/bugreport.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/bugreport.js b/js/bugreport.js index 4d258c2..8b92bc7 100644 --- a/js/bugreport.js +++ b/js/bugreport.js @@ -58,8 +58,8 @@ function infoload() { var device = item.id.substring(0,1); item.value = info[device]; }); - if (typeof(Storage) !== 'undefined') { - alert('This web browser does no support localstorage. Store info will not function!'); + if (typeof(Storage) === 'undefined') { + alert('This web browser does not support localStorage. Store info will not function!'); } } From 5fe388097a5282ebdcf235caae4ec6e8e847d804 Mon Sep 17 00:00:00 2001 From: Alipoodle Date: Wed, 9 Oct 2019 19:57:46 +0100 Subject: [PATCH 5/6] Move + Add more Version help Moved around the messages to work a bit better. Added more help for Linux, iOS, Mac, Please correct me if you feel these need to be changed --- storeinfo.html | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/storeinfo.html b/storeinfo.html index 62caeab..4ffa3c9 100644 --- a/storeinfo.html +++ b/storeinfo.html @@ -51,25 +51,25 @@
    Store Info
    Notice:

    Information is stored locally to your Device and not on any of our servers.

    - + -

    This is the Windows and version you are running. Example: Windows 10 64x, Version 1903. (help)

    +

    This is the Windows and version you are running. (help)
    Example: Windows 10 64x, Version 1903.

    -

    This is the Mac computer and version you are running. Example: Early 2015 Macbook Pro Retina, macOS Sierra 10.12.6.

    +

    This is the Mac computer and version you are running. (help)
    Example: Early 2015 Macbook Pro Retina, macOS Sierra 10.12.6.

    -

    This is the Linux distro and version you are running. Example: Ubuntu 18.04.

    +

    This is the Linux distro and version you are running. (help)
    Example: Ubuntu 18.04.

    -

    This is the Phone you are running, and the Android version you are running. Example: Pixel 3, Android 9. (help)

    +

    This is the Phone you are running, and the Android version you are running. (help)
    Example: Pixel 3, Android 9.

    -

    This is the Device you are running, and the iOS version you are running. Example: iPhone XR iOS 12.3.1.

    +

    This is the Device you are running, and the iOS version you are running. (help)
    Example: iPhone XR iOS 12.3.1.

    @@ -112,12 +112,13 @@

    Finding your Microsoft Windows Version

    Finding your Mac Version

    -
    TITLE
    +
    All versions
      -
    • INFO
    • -
    • MORE INFO
    • -
    • LITTLE BIT MORE
    • +
    • Choose Apple menu in the top left of your Screen
    • +
    • Select the About This Mac
    • +
    • At the top will say the Version of macOS you are running.
    • +
    • On the First line below the version will tell you the Specific mac you are using!
    @@ -129,12 +130,12 @@

    Finding your Mac Version

    Finding your Linux Version

    -
    TITLE
    +
    Most Linux Versions
      -
    • INFO
    • -
    • MORE INFO
    • -
    • LITTLE BIT MORE
    • +
    • Open a new Command line interface
    • +
    • Type in the following command: lsb_release -a
    • +
    • and you can use the Description field.
    @@ -164,12 +165,12 @@

    Finding your Android Version

    Finding your iOS Version

    -
    TITLE
    +
    All iOS Versions
      -
    • INFO
    • -
    • MORE INFO
    • -
    • LITTLE BIT MORE
    • +
    • Go to Settings > General.
    • +
    • Then tap About
    • +
    • In the menu you will have Modal Name + Software Version
    From 9a8f3d4cb8a357cb7dcd755178c851f04d0e044b Mon Sep 17 00:00:00 2001 From: Alipoodle Date: Wed, 10 Jun 2020 15:49:31 +0100 Subject: [PATCH 6/6] Updated for new Bot! --- css/bugreport.css | 8 ++++---- index.html | 42 +++++++++++++++++++----------------------- js/bugreport.js | 35 +++++++++++++++++++++-------------- storeinfo.html | 2 +- 4 files changed, 45 insertions(+), 42 deletions(-) diff --git a/css/bugreport.css b/css/bugreport.css index 8a7431b..b828424 100644 --- a/css/bugreport.css +++ b/css/bugreport.css @@ -14,7 +14,7 @@ body { } body.light { - background-color: #fefefe; + background-color: #fefefe; color: #0a0a0a; } @@ -113,7 +113,7 @@ body.light .help-text { } .button-group a { - width: 5.6rem; + width: 6.2rem; } .button-group .button { @@ -129,13 +129,13 @@ body.light .help-text { } @media screen and (max-width: 39.9375em) { - .trello > .button { + .workboards > .button { border-radius: 0.1875rem; width: 49%; } } -.trello { +.workboards { margin-top: 0.5rem; margin-bottom: 0.5rem; } diff --git a/index.html b/index.html index 7aeeca9..5523bb8 100644 --- a/index.html +++ b/index.html @@ -12,15 +12,6 @@ -
    @@ -50,16 +41,15 @@
    Create a bug report
    Remember:
      -
    • Check the Trello boards and/or bug report channels in case your bug has already been reported:
    • Check the Workboards and/or bug report channels in case your bug has already been reported:
    • Screenshots/video may help explain your report and are required for visual bugs. You can post links to these in a client chat channel and ask for a Bug Hunter to attach them for you
    • -
    • Bananas are an excellent source of potassium
    @@ -87,7 +77,7 @@
    Create a bug report

    The version/build of Discord you're using, e.g. TestFlight 1.9.2 (help)

    -

    Your system settings including device model (if on mobile), OS, and version, e.g. iPhone 8, iOS 11.0.3

    +

    Your system settings including device model (if on mobile), OS, and version, e.g. iPhone 8, iOS 11.0.3
    Use site's stored info here, in the same way as it's done on the bot with a -w for Windows