This repository was archived by the owner on Feb 21, 2026. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathformb.html
More file actions
66 lines (58 loc) · 2.21 KB
/
Copy pathformb.html
File metadata and controls
66 lines (58 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<base target="_top">
<script>
function pass(ingoing) {
console.log(ingoing);
return ingoing;
}
function parseSource(source) {
try {
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();
// Handle the "docs-crq" query parameter
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"));
}
}
// Construct the URL
const url = "https://docs.google.com" + info_map["docs-crp"] + (my_query_params.toString() ? "?" + my_query_params.toString() : "");
return { token: token, url: url };
} catch (e) {
throw new Error("Error parsing source data: " + e.message);
}
}
window.addEventListener("load", () => {
document.querySelector("#submitButton").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(); // Automatically submits the form
} catch (e) {
document.querySelector("#stats").textContent = e.toString(); // Display error message
}
});
});
</script>
<title>turtles are cool</title>
</head>
<body>
<h3>Paste your form source here:</h3>
<textarea id="form_source" rows="10" cols="50"></textarea>
<br>
<button id="submitButton">Unlock and Submit</button>
<br><br>
<p id="stats" style="color: red;"></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>