UserScripts icon indicating copy to clipboard operation
UserScripts copied to clipboard

Pagetual: Site Acts Weird

Open rahaaatul opened this issue 1 year ago • 44 comments

Description

When pagetual script is on, this site acts weird. See screenshot below.

Steps to reproduce the behavior

  1. Go to Mobilism
  2. Search something
  3. See error.

Expected behavior

Normal

Actual behavior

Abnormal

Device Information

  • Device: Vivo V2043
  • OS: Android 11
  • Browser: Kiwi Browser (103.0.5060.104)
  • Pagetual Version: 1.9.30.3.11

rahaaatul avatar Jul 28 '22 07:07 rahaaatul

    {
        "name": "Mobilism",
        "type": 0,
        "url": "^https://forum\\.mobilism\\.org/",
        "pageElement": "id('page-body')//section|id('page-body')/main/table[last()]/tbody/tr|//div[@class='row-fluid blue-bar']",
        "nextLink": "//a[i/@class='icon-chevron-right']",
        "css": "td.center { display: none; }"
    }

hoothin avatar Jul 28 '22 08:07 hoothin

@hoothin I thought it was happening only on search results but it's happening all over the site, for example: https://forum.mobilism.org/viewforum.php?f=399 Screenshot_2022_0728_171737

rahaaatul avatar Jul 28 '22 11:07 rahaaatul

    {
        "name": "Mobilism",
        "type": 0,
        "url": "^https://forum\\.mobilism\\.org/",
        "pageElement": "id('page-body')//section|id('page-body')/main/table[last()]/tbody/tr|//div[@class='row-fluid blue-bar']",
        "nextLink": "//a[i/@class='icon-chevron-right']",
        "css": ".stats-color,.last-color,td.center { display: none; }"
    }

hoothin avatar Jul 28 '22 11:07 hoothin

That site is really weird, it has the different structure between desktop & mobile on the same url. So the rule I pasted before will effect only on mobile phone. You can made one by yourself if you know a little css.

hoothin avatar Jul 28 '22 11:07 hoothin

{ "name": "Mobilism", "type": 0, "url": "^https://forum\.mobilism\.org/", "pageElement": "id('page-body')//section|id('page-body')/main/table[last()]/tbody/tr|//div[@class='row-fluid blue-bar']", "nextLink": "//a[i/@class='icon-chevron-right']", "css": ".stats-color,.last-color,td.center { display: none; }" }

It's fixed, now. Thank you, @hoothin .

rahaaatul avatar Jul 28 '22 11:07 rahaaatul

That site is really weird, it has the different structure between desktop & mobile on the same url. So the rule I pasted before will effect only on mobile phone. You can made one by yourself if you know a little css.

I don't know CSS, but I'd love to learn it.

rahaaatul avatar Jul 28 '22 11:07 rahaaatul

@hoothin

https://www.linuxfromscratch.org/blfs/view/svn/postlfs/nano.html

IMG_20220804_145717.jpg

rahaaatul avatar Aug 04 '22 08:08 rahaaatul

    {
        "name": "linuxfromscratch",
        "url": "^https://www\\.linuxfromscratch\\.org",
        "pageElement": "body>*",
        "css": ".sect1{overflow-wrap: break-word;}div.navheader{position: relative;}"
    }

hoothin avatar Aug 04 '22 09:08 hoothin

@hoothin https://forum.xda-developers.com/t/binary-gnu-nano-editor-v2-2-6-for-android.1530519/ chrome_screenshot_Aug 4, 2022 6_16_13 PM GMT+06_00.png

rahaaatul avatar Aug 04 '22 12:08 rahaaatul

Pagetual did not run on this page, so that style may be cause by any other extension.

After all, the rule is

    {
        "name": "xda-developers",
        "url": "^https://forum\\.xda\\-developers\\.com/t/",
        "pageElement": ".block-body>article"
    }

hoothin avatar Aug 04 '22 12:08 hoothin

@hoothin This site doesn't show thumbnails for below contents and keeps loading but pages never load.

https://user-images.githubusercontent.com/86149861/183237438-16a8e50e-3ef9-4304-b091-d34e32000878.mp4

rahaaatul avatar Aug 06 '22 06:08 rahaaatul

Fixed. Maybe you can paste the URL here next time.

    {
        "name": "Linux Tips, Tricks and Tutorials | Linuxize",
        "url": "^https://linuxize\\.com",
        "pageElement": ".post-list>.flex-wrap>section",
        "lazyImgSrc": "data-cfsrc"
    }

hoothin avatar Aug 06 '22 08:08 hoothin

Fixed. Maybe you can paste the URL here next time.

    {
        "name": "Linux Tips, Tricks and Tutorials | Linuxize",
        "url": "^https://linuxize\\.com",
        "pageElement": ".post-list>.flex-wrap>section",
        "lazyImgSrc": "data-cfsrc"
    }

Sorry, my bad! I forgot to do that.

The thumbnails aren't loading though. Edit: it's a site problem, I think. Tried with no extensions or ad blockers enabled.

rahaaatul avatar Aug 06 '22 09:08 rahaaatul

You need update the script first

hoothin avatar Aug 06 '22 15:08 hoothin

You need update the script first

Everytime I comment now, I first reinstall/upgrade and update the script. Then test it. If it doesn't work, like it supposed to, I comment.

As I said, this occurs without pagetual or any extensions on. Tried on total vanilla browser, thumbnails doesn't load.

rahaaatul avatar Aug 06 '22 15:08 rahaaatul

Screenshot_20220806_234638 I tried on kiwi and it works.

hoothin avatar Aug 06 '22 15:08 hoothin

Screenshot_20220806_234638 I tried on kiwi and it works.

I'm not talking about these thumbnails, when you scroll down in every page, you will see a pattern:

Each page loads 4 thumbnails for first 4 links, after that there are no thumbnails in later links. And it's on every page.

That's what I was talking about. Other than that it's working quite well.

rahaaatul avatar Aug 06 '22 16:08 rahaaatul

https://trakt.tv/shows/stranger-things/seasons/4/episodes/1

Doesn't matter really, but these are missing from next page.

  • Actor's Name and Photo.
  • Watching Now.
  • Comments. chrome_screenshot_Aug 7, 2022 12_08_28 AM GMT+06_00.png

rahaaatul avatar Aug 06 '22 18:08 rahaaatul

    {
        "name": "Trakt",
        "url": "^https://trakt\\.tv",
        "pageElement": "section#info-wrapper > div.container > div.row > div#overview>*",
        "action": 1,
        "waitElement": [
            ".summary-activity",
            "#popular-comments.fade:not(.in)"
        ]
    }

So you are also a fan of Stranger-Things!

hoothin avatar Aug 07 '22 00:08 hoothin

So you are also a fan of Stranger-Things!

Yes! Watched all of them, it was so good! Especially season 4, can't wait for season 5. Who is your favorite character from the show? Mine is Dusty-bun 😂.

rahaaatul avatar Aug 07 '22 04:08 rahaaatul

https://1337x.to/search/something/1/

Not working on 1337x.to.

rahaaatul avatar Aug 07 '22 06:08 rahaaatul

Absolutely be little El😄. I checked 1337x.to under kiwi and it looks like acting well. Can you check again?

hoothin avatar Aug 12 '22 07:08 hoothin

Absolutely be little El😄.

She's scary too 😖😅.

I checked 1337x.to under kiwi and it looks like acting well. Can you check again?

I did. And, it's working now. Weird. 😕

rahaaatul avatar Aug 12 '22 07:08 rahaaatul

Soccercatch

Doesn't auto stitch, basically all over this website, same problem.

rahaaatul avatar Aug 16 '22 12:08 rahaaatul

    {
        "name": "Soccercatch.com",
        "url": "^https://www\\.soccercatch\\.com.*#shows",
        "nextLink": ".tabs-page[data-title=shows] .pagination-next",
        "init": "if(doc)doc.querySelector('[data-title=shows]').click();",
        "pageElement": ".show-item"
    }

This rule is for shows tab, you can modify for other tabs.

hoothin avatar Aug 16 '22 13:08 hoothin

https://www.16personalities.com/free-personality-test

Tried disabling for this site but didn't work. Checking choices in next pages, doesn't work. Can you check?

rahaaatul avatar Aug 16 '22 17:08 rahaaatul

So you means that you can't disable for this site? I checked the site, there is code about recording & calculating your choices. I disabled pagetual and it works well. What's your trouble?

hoothin avatar Aug 17 '22 00:08 hoothin

So you means that you can't disable for this site?

I disabled, and it showed it disabled. I refreshed and I tapped next page choices, but they were not selected.

I disabled pagetual and it works well. What's your trouble?

It works for me now, too. Possibly problem with browser. I restarted it and it worked.

Sorry for bothering you.

rahaaatul avatar Aug 17 '22 10:08 rahaaatul

    {
        "name": "Soccercatch.com",
        "url": "^https://www\\.soccercatch\\.com.*#shows",
        "nextLink": ".tabs-page[data-title=shows] .pagination-next",
        "init": "if(doc)doc.querySelector('[data-title=shows]').click();",
        "pageElement": ".show-item"
    }

This rule is for shows tab, you can modify for other tabs.

This one isn't working, can you check again?

rahaaatul avatar Aug 17 '22 10:08 rahaaatul

Ah, I tested only on desktop, I'll check mobile for you soon. Here it is, you can try to modify it to optimize for yourself.

    {
        "name": "Soccercatch.com",
        "url": "^https://www\\.soccercatch\\.com",
        "nextLink": ".tabs-page[data-active=true] .pagination-next",
        "init": "if(doc){let tabName=document.querySelector('[data-active=true]').dataset.title;doc.querySelector('[data-title='+tabName+']').click()}",
        "pageElement": "[data-active=true]>section>*",
        "wait": "if(doc==document)return true;let tabName=document.querySelector('[data-active=true]').dataset.title;doc.querySelector('[data-title='+tabName+']').click();return true;"
    }

hoothin avatar Aug 18 '22 01:08 hoothin