Added Random Strings
Added Random Strings
This commit is contained in:
parent
2af2363553
commit
5dfc7703e6
1 changed files with 26 additions and 2 deletions
|
|
@ -1,6 +1,28 @@
|
||||||
var pd = {
|
var pd = {
|
||||||
version: "1.4.8",
|
version: "1.4.9",
|
||||||
bookmarkver: "1.4",
|
bookmarkver: "1.4",
|
||||||
|
editStrings: [
|
||||||
|
"I love ice cream.",
|
||||||
|
"I hate beer.",
|
||||||
|
"My favorite color is blue.",
|
||||||
|
"I enjoy reading books.",
|
||||||
|
"I like to go hiking.",
|
||||||
|
"My favorite movie is Inception.",
|
||||||
|
"I enjoy playing video games.",
|
||||||
|
"I like to travel.",
|
||||||
|
"I'm learning to play the guitar.",
|
||||||
|
"I enjoy cooking.",
|
||||||
|
"I love listening to music.",
|
||||||
|
"I enjoy watching the sunset.",
|
||||||
|
"I like to explore new places.",
|
||||||
|
"I find joy in reading a good book.",
|
||||||
|
"I appreciate a good cup of coffee.",
|
||||||
|
"I enjoy spending time with my friends.",
|
||||||
|
"I like learning new things.",
|
||||||
|
"I find peace in long walks.",
|
||||||
|
"I enjoy the sound of rain.",
|
||||||
|
"I love the smell of fresh bread.",
|
||||||
|
],
|
||||||
init: function () {
|
init: function () {
|
||||||
pd.checks.versions();
|
pd.checks.versions();
|
||||||
if (window.pd_processing !== true) {
|
if (window.pd_processing !== true) {
|
||||||
|
|
@ -699,12 +721,14 @@ var pd = {
|
||||||
edit: function (item) {
|
edit: function (item) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (pd.performActions) {
|
if (pd.performActions) {
|
||||||
|
var randomEditString =
|
||||||
|
pd.editStrings[Math.floor(Math.random() * pd.editStrings.length)];
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/api/editusertext",
|
url: "/api/editusertext",
|
||||||
method: "post",
|
method: "post",
|
||||||
data: {
|
data: {
|
||||||
thing_id: item.data.name,
|
thing_id: item.data.name,
|
||||||
text: pd.task.config.editText,
|
text: randomEditString,
|
||||||
id: "#form-" + item.data.name,
|
id: "#form-" + item.data.name,
|
||||||
r: item.data.subreddit,
|
r: item.data.subreddit,
|
||||||
uh: pd.config.uh,
|
uh: pd.config.uh,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue