What is Locked Mode Quiz Launcher?

Locked Mode Quiz Launcher is a launcher that allows you to launch locked mode forms without locked mode.
The google sheets version can be found here - Frm Crcker.xlsx (upload it to google sheets and paste the code.gs stuff)



Why would I use this over the original

It works without bookmarklets.

Are there any drawbacks?

The owner will be notified if you click the button more than once. Therefore in the event that the test is closed, you're screwed. Also, don't completely obfuscate the testing page (switch tabs, switch to another window that is maximized or covers the testing page, switch desktops, minimize the testing page, etc.) as if that happens, the test is deleted and I have no way of circumventing that happening via this method. Other than academic honesty, you have pretty much nothing else to worry about.

How do I do it?

  1. Obtain the source of the launch page. (Doesn't matter whether it says you're able to open the form IF IT SAYS YOU CAN: DON'T) a. Get to the view-source: page (add view-source: to the beginning of the URL) (May be bl*cked by admin, if so, do on another device, this can be completed as many times as required with no issues)

    b. Copy all of it

  2. Open a new window that you'll be able to switch to later, it should be sized as to not cover the whole form.

  1. Open the Cracker, then profit (click through the authorization prompts if this is your first time) and then paste the previously copied text into the text area and press Do your thing! as you watch a new tab with the form open!

Precautions

  1. NEVER OBFUSCATE THE TEST COMPLETELY!!!!
  2. NEVER OPEN A NEW WINDOW WHILE THE TEST IS OPEN
  3. NEVER OPEN A NEW TAB IN THE SAME WINDOW AS THE TEST WHILE IT'S OPEN
  4. NEVER SWITCH TO ANOTHER TAB IN THE SAME WINDOW WHILE THE TEST IS OPEN
  5. TO ACCESS OUTSIDE RESOURCES ONLY ALT+TAB TO THE WINDOW OPENED IN STEP 2

Apps Script stuff

Code.gs

function onOpen(e) {
  const ui = SpreadsheetApp.getUi();
  ui.createMenu("cracker")
    .addItem("eat crackers, then profit", "profit")
    .addToUi();
}

function profit() {
  SpreadsheetApp.getUi() // Or DocumentApp or SlidesApp or FormApp.
      .showModalDialog(HtmlService.createHtmlOutputFromFile('lol').setWidth(1000).setHeight(600), 'Form Cracker');
}

lol.html

<!DOCTYPE html>
<html>
    <style>
        *{
            color:rgb(243, 243, 228); background-color: black; font-family: monospace; border-radius: 5px;
        }
        button{
    transition:ease-out 0.3s;
    padding: 5px 15px;
    border: none;
    color: #ca89ff;
    border-radius: 5px;
    position: relative;
    outline: none;
    border: 3px solid #9615ff;
    z-index: 3;
    background-color: transparent;

}
button:hover{
    cursor: pointer;
    color: #fff;
    
}
button:before{
    transition: 0.5s all ease;
    position: absolute;
    top: 0;
    left: 50%;
    right: 50%;
    bottom: 0;
    opacity: 0;
    content: "";
    background-color: #9615ff;
}
button:hover:before{
    transition: 0.5s all ease;
    left: 0;
    right: 0;
    opacity: 1;
    z-index: -1;

}

    </style>

<head>
  <base target="_top">
  <script>
    function pass(ingoing) {
        console.log(ingoing);
        return ingoing;
      }
      function parseSource(source) {
        const info_map = JSON.parse(source.match(/_docs_flag_initialData=(?<data>{.*?});<\/script>/).groups.data);
        const token = info_map.info_params.token;
        let my_query_params = new URLSearchParams();
        if (info_map["docs-crq"]){
          let url_search_params = new URLSearchParams(info_map["docs-crq"]);
          if (url_search_params.get("hr_submission")){
            my_query_params.append("hr_submission", url_search_params.get("hr_submission"));
          }
        }
        const url = "https://docs.google.com"  + info_map["docs-crp"] + (my_query_params.toString() ? "?" + my_query_params.toString(): "");
        return {token: token, url: url};
      }
      window.addEventListener("load", () => {
      document.querySelector("#yourthing").addEventListener("click", () => {
        try {
          const source_info = parseSource(document.querySelector("#form_source").value);
          document.querySelector("#token").value = source_info.token;
          document.querySelector("#greatest_form").setAttribute("action", source_info.url);
          document.querySelector("#sub").click();
        } catch(e) {
          document.querySelector("#stats").textContent = e.toString();
        }
      });
      });
  </script>
</head>

<body>
  <h3>Paste your form source here:</h3>
  <textarea id="form_source" style="height:380px; width:950px;"></textarea>
  <button id="yourthing" >Do your thing!</button>
  <br>
  <p id="stats"></p>
  <form target="_blank" method="POST" id="greatest_form">
    <input type="hidden" name="token" id="token" >
    <input type="hidden" name="tz_offset" value="120">
    <input type="submit" style="display: none;" value="Submit" id="sub">
  </form>
</body>

</html>