TamperMonkey Script

Started by Ssieth, June 09, 2015, 05:27:11 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Amaris

You're welcome! It's happened to me several times! haha


FyreFoxx

I absolutely adore this script and it's made things so much better. I preface this by saying that I do not use any normal browser. I use something called Pale Moon, which is a derivative browser based on Firefox. It took some searching to find the proper extension that would function like TamperMonkey does, as Pale Moon is not 100% compatible with all Firefox extensions (in this case, GreaseMonkey), only some, but I found a working variant that can utilize the script and has since worked flawlessly.

I just have one small question. I actually really like how things put in quotations are colored to be easily read, but I do sometimes have a story where multiple characters have color coded dialogue and this script makes everything the same color, regardless of any BBC formatting. Is there an easy workaround for this? Perhaps having the color formatting take priority over the script coding? I skimmed the script file and did see a section based on that, but I'm afraid of messing something up myself.

Théfaux
 Current Status: TENTATIVE
 How To Stoke The Fyre (O/O) Updated Aug 19, 2023
 What does the Foxx say? (A/A) Updated Oct 1, 2023
 Den of Iniquity (World Building)

FoxWriter

so, i had to switch back to firefox because Chrome was sucking up too much of my computers power, now every time i try to download the script it says

"429. too many requests"

i've tried like 6 times now and it keeps saying that. am i doing something wrong or is the website just messing with me?
[tr][td]
My Cafe[/td][/tr]
[tr][td]Choose your own adventure : Fates be Chosen[/td][/tr]
[tr][td]50 Tales[/td][/tr]
[tr][td] Word of the Day[/td]
[/tr][/table]

Devil

I've just recently discovered Tampermonkey and I'm using it for the first time. I created a snippet for my character header coder so I don't have to type it every time I post. I'm not sure why, but for some reason the snippet will only paste itself in the subject box, regardless of where I have the cursor anchored prior to selecting the snippet. Any help would be appreciated.


As for the 'Draft' option; Do I need to click the 'save draft' button below the text box in order to save the draft, or does it save automatically based on the settings?


Thanks in advance for any help.
“The greatest trick the Devil ever pulled was convincing the world he didn’t exist”—Charles Baudelaire

persephone325

I had to do a soft reset of my computer and now I can't seem to get the script to work, even though it's installed. I've tried logging out of E, refreshing the browser, completely closing the browser, disabling and then reenabling the script. I don't know what else to try.
This doesn't have to end in a fight, Buck.
It always ends in a fight.
You pulled me from the river. Why?
I don't know.
"Don't dwell on those who hold you down. Instead, cherish those who helped you up."

Al Terego

                    

persephone325

This doesn't have to end in a fight, Buck.
It always ends in a fight.
You pulled me from the river. Why?
I don't know.
"Don't dwell on those who hold you down. Instead, cherish those who helped you up."

Al Terego

I'm on Firefox.  Ctrl-Shift-J opens the console.  Errors there sometimes can be helpful
                    

Al Terego

                    

persephone325

#859
Quote from: Al Terego on February 23, 2023, 08:41:33 PM
I'm on Firefox.  Ctrl-Shift-J opens the console.  Errors there sometimes can be helpful

Interesting... I have several errors that relate to the script.

Spoiler: Click to Show/Hide
Could not execute [Greasemonkey script elliquiy.improver.ssieth.co.uk/Elliquiy Improver; version 1.46.3]
expected expression, got ')' execute.js:29:15
    executeUserscriptOnNavigation moz-extension://1cc059f9-4e2f-4287-9578-c1ed05832a79/src/bg/execute.js:29
Could not execute [Greasemonkey script elliquiy.improver.ssieth.co.uk/Elliquiy Improver; version 1.46.3]
expected expression, got ')' execute.js:29:15
    executeUserscriptOnNavigation moz-extension://1cc059f9-4e2f-4287-9578-c1ed05832a79/src/bg/execute.js:29
Could not execute [Greasemonkey script elliquiy.improver.ssieth.co.uk/Elliquiy Improver; version 1.46.3]
expected expression, got ')' execute.js:29:15
    executeUserscriptOnNavigation moz-extension://1cc059f9-4e2f-4287-9578-c1ed05832a79/src/bg/execute.js:29
Could not execute [Greasemonkey script elliquiy.improver.ssieth.co.uk/Elliquiy Improver; version 1.46.3]
expected expression, got ')' execute.js:29:15
    executeUserscriptOnNavigation moz-extension://1cc059f9-4e2f-4287-9578-c1ed05832a79/src/bg/execute.js:29
Could not execute [Greasemonkey script elliquiy.improver.ssieth.co.uk/Elliquiy Improver; version 1.46.3]
expected expression, got ')' execute.js:29:15
    executeUserscriptOnNavigation moz-extension://1cc059f9-4e2f-4287-9578-c1ed05832a79/src/bg/execute.js:29
Could not execute [Greasemonkey script elliquiy.improver.ssieth.co.uk/Elliquiy Improver; version 1.46.3]
expected expression, got ')' execute.js:29:15
    executeUserscriptOnNavigation moz-extension://1cc059f9-4e2f-4287-9578-c1ed05832a79/src/bg/execute.js:29
Could not execute [Greasemonkey script elliquiy.improver.ssieth.co.uk/Elliquiy Improver; version 1.46.3]
expected expression, got ')' execute.js:29:15
    executeUserscriptOnNavigation moz-extension://1cc059f9-4e2f-4287-9578-c1ed05832a79/src/bg/execute.js:29
Could not execute [Greasemonkey script elliquiy.improver.ssieth.co.uk/Elliquiy Improver; version 1.46.3]
expected expression, got ')' execute.js:29:15
    executeUserscriptOnNavigation moz-extension://1cc059f9-4e2f-4287-9578-c1ed05832a79/src/bg/execute.js:29
Could not execute [Greasemonkey script elliquiy.improver.ssieth.co.uk/Elliquiy Improver; version 1.46.3]
expected expression, got ')' execute.js:29:15
    executeUserscriptOnNavigation moz-extension://1cc059f9-4e2f-4287-9578-c1ed05832a79/src/bg/execute.js:29
Could not execute [Greasemonkey script elliquiy.improver.ssieth.co.uk/Elliquiy Improver; version 1.46.3]
expected expression, got ')' execute.js:29:15
    executeUserscriptOnNavigation moz-extension://1cc059f9-4e2f-4287-9578-c1ed05832a79/src/bg/execute.js:29
Could not execute [Greasemonkey script elliquiy.improver.ssieth.co.uk/Elliquiy Improver; version 1.46.3]
expected expression, got ')' execute.js:29:15
    executeUserscriptOnNavigation moz-extension://1cc059f9-4e2f-4287-9578-c1ed05832a79/src/bg/execute.js:29
Could not execute [Greasemonkey script elliquiy.improver.ssieth.co.uk/Elliquiy Improver; version 1.46.3]
expected expression, got ')' execute.js:29:15
    executeUserscriptOnNavigation moz-extension://1cc059f9-4e2f-4287-9578-c1ed05832a79/src/bg/execute.js:29
Could not execute [Greasemonkey script elliquiy.improver.ssieth.co.uk/Elliquiy Improver; version 1.46.3]
expected expression, got ')' execute.js:29:15
    executeUserscriptOnNavigation moz-extension://1cc059f9-4e2f-4287-9578-c1ed05832a79/src/bg/execute.js:29


It looks to me like they're all the same. I'm just not sure what they mean.

When I click on the link, it opens a new tab and shows me this code:

Spoiler: Click to Show/Hide
'use strict';
/*
This file is responsible for observing content navigation events and triggering
content script executions.

TODO: Make document_start execution time work as intended.
*/

function executeUserscriptOnNavigation(detail) {
  if (false === getGlobalEnabled()) return;

  const userScriptIterator = UserScriptRegistry.scriptsToRunAt(detail.url);
  for (let userScript of userScriptIterator) {
    let options = {
      'code': userScript.evalContent,
      'matchAboutBlank': true,
      'runAt': 'document_' + userScript.runAt,
    };
    if (detail.frameId) options.frameId = detail.frameId;
    chrome.tabs.executeScript(detail.tabId, options, () => {
      if (!chrome.runtime.lastError) return;
      const errMsg = chrome.runtime.lastError.message;

      // TODO: i18n?
      if (errMsg.startsWith('Message manager disconnected')) return;
      if (errMsg.startsWith('No matching message handler')) return;

      // TODO: Better indication of the root cause.
      console.error(
          'Could not execute', userScript.toString(), '\n', errMsg);
    });
  }
}
This doesn't have to end in a fight, Buck.
It always ends in a fight.
You pulled me from the river. Why?
I don't know.
"Don't dwell on those who hold you down. Instead, cherish those who helped you up."

Al Terego

Could be something interfering with the script?  I suggest creating a new empty profile with just tampermonkey and this script .  If it works, you can proceed investigating from there.
                    

persephone325

Now I have no errors at all, but it's still not working. *sigh*
This doesn't have to end in a fight, Buck.
It always ends in a fight.
You pulled me from the river. Why?
I don't know.
"Don't dwell on those who hold you down. Instead, cherish those who helped you up."

Al Terego

Did you try sacrificing a black goat to Hades?
                    

persephone325

Quote from: Al Terego on February 24, 2023, 12:45:01 AM
Did you try sacrificing a black goat to Hades?


I would, but I don't know where to get one at this time of night. lol
This doesn't have to end in a fight, Buck.
It always ends in a fight.
You pulled me from the river. Why?
I don't know.
"Don't dwell on those who hold you down. Instead, cherish those who helped you up."

BlueOrange

I’m willing to bet that there’s a control character (such as “ ) that’s in the data that is causing this problem.

It is indeed the same error every time. Execute.js is attempting to evaluate an expression (such as “x < y”) and instead of an expression, it’s getting just a fragment. Something is messing with the expression.

What I can’t tell you (but someone more familiar with the code might know) is exactly what’s causing that. But checking for control characters in your user configured stuff might help.

FoxWriter

is anyone else having issues with their Snippets not working? i'v tried to save Snippets for the last three days and it's not saving any of them.
[tr][td]
My Cafe[/td][/tr]
[tr][td]Choose your own adventure : Fates be Chosen[/td][/tr]
[tr][td]50 Tales[/td][/tr]
[tr][td] Word of the Day[/td]
[/tr][/table]

FoxWriter

never mind. apparently i had to set them in my settings. ^^; i'm just gonna go curl up in a corner and pretend i know how computers work.
[tr][td]
My Cafe[/td][/tr]
[tr][td]Choose your own adventure : Fates be Chosen[/td][/tr]
[tr][td]50 Tales[/td][/tr]
[tr][td] Word of the Day[/td]
[/tr][/table]

RainyHigh

Hello there everyone~

I've barely learned about this excellent tool tonight, thanks to Amaris.

I've been trying to use it for post headers but have encountered a slight issue.

After I use snippets in a post, they disappear.

Here is a video that shows what's going on:

https://watch.screencastify.com/v/NXSUt8nAPmzWpWPQ71RJ

Any advice or suggestions would be welcome.

Thanks all!
Rainy's Ons and Offs
Currently NOT open for solo stories
Rainy's Scene Tracker

Chasing Dreams

Quote from: RainyHigh on April 11, 2023, 09:17:42 PM
Hello there everyone~

I've barely learned about this excellent tool tonight, thanks to Amaris.

I've been trying to use it for post headers but have encountered a slight issue.

After I use snippets in a post, they disappear.

Here is a video that shows what's going on:

https://watch.screencastify.com/v/NXSUt8nAPmzWpWPQ71RJ

Any advice or suggestions would be welcome.

Thanks all!
In the script settings, do you have the box for the snippets checked?
Selectively Available for NEW stories.
Status ⋮ Around here somewhere.
Posts owed ⋮ 4 out of 11 
Posting Order (Click to see.)

Thank you Amaris for the beautiful signature!


RainyHigh

Ama also reached out to me and showed me the same thing.

Thank you Chasing Dreams and Amaris.

I did NOT have it checked on the settings.

Rainy's Ons and Offs
Currently NOT open for solo stories
Rainy's Scene Tracker

Haibane

I feel sure this has been addressed before but 35 pages of discussion is a bit daunting to look through.

Does this script affect Elliquiy Bookmarks in any way? Is there a way to have subfolders or some similar organisation for bookmarks?

Thank you for any information.

atenai

The script adds a "Tags" feature which is effectively folders, though you can tag a thread with more than one tag. When you bookmark a thread, the tag options box will pop up, but you can also click the icon to the left of any bookmark in the bookmarks list to open the Tags dialog. There are only a couple tags the script comes with, but you can add your own. Just be wary of the punctuation issue the Tags dialog warns you about! :-)
~Atenai

IRL Status: Offline. On hiatus.

Atenai's Addictions (O/Os & Ideas), Requests, and Apologies [NEW! 17 Jun '23]
Elluiki User Page (Bio, Stories Old and New)   "Fucking insatiable, teasing brat."

Haibane

#872
Oooh, thanks! I will investigate.

EDIT a couple of minutes later: Yes, now I see it. The bookmarks all still stay in the same sequence on the one list though. I was hoping for some kind of graphical nesting or threading or hiding but I guess that's set out by the website formatting.


atenai

Yeah, I think that might be asking a bit much from a script. Organize, yes; totally rewrite the bookmarks forum code, no.
~Atenai

IRL Status: Offline. On hiatus.

Atenai's Addictions (O/Os & Ideas), Requests, and Apologies [NEW! 17 Jun '23]
Elluiki User Page (Bio, Stories Old and New)   "Fucking insatiable, teasing brat."

Jaclyn

Has this been tested on other SMS sites?