Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Plugin support
  3. » pat_speeder

#109 2024-05-13 04:55:19

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: pat_speeder

phiw13 wrote #337181:

@Patrick

Is it possible to have a more fine-grained list of tags ignored or left un-minified by pat_speeder?

For example, I would like to have JSON blocks minified (<script type="application/ld+json">) but not the few standard JS blocks left untouched.

Sure! That’s why the option is an input field: you can add all tags you want (in a comma separated list) ;)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#110 2024-05-13 05:14:42

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,081
Website GitHub Mastodon Twitter

Re: pat_speeder

Pat64 wrote #337180:

Yep. That could be interesting.

You have mail. Let me know if it did not arrive.

phiw13 wrote #337181:

@colak

Under Admin > Preferences > pat speeder: Is the “Enable pat_speeder?” entry set to “Yes”?

(without that, the extension does nothing on my side)

Hi Philippe
I do have them checked:


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#111 2024-05-13 05:51:57

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: pat_speeder

The labels aren’t translated despite the Textpack. Why ?


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#112 2024-05-13 06:16:39

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,162
Website

Re: pat_speeder

Perhaps I was not clear. Given the two script blocks below, I would like to minify the first one (JSON) but not the second one. Would that be possible? As far as I can tell, your logic rely only on tags, e.g. script. Perhaps I would need to wrap my first script block below in <txp:pat_speeder><script type="application/ld+json">[. stuff . ] </script></txp:pat_speeder> (that down not work, of course)

Somewhere in the head of a document I have some JSON block

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebPage",
  "name": "Playground | Silly Web site",
  "url": "http://silly-site.tld/playground/",
  "description": "Some nifty description about non-sensical stuff",
  "publisher": {
    "@type": "Organization",
    "name": "Silly Website inc.",
    "logo": {
      "@type": "ImageObject",
      "url": "http://silly-site.tld//images/16.png",
      "width": "900",
      "height": "180"
    }
  }
}
</script>

At the end of a page I have your standard JS block:

<script>
const prvs = new Parvus({
  gallerySelector: '.image-group',
  selector: '.image-lightbox',
  docClose: true,
  simulateTouch: false,
}</script>

Meanwhile – for this site, I went another way, all my 3 little standard JS blocks are in an external JS file, only the JSON block(s) are left. That is a way to solve my issue, atm.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#113 2024-05-13 06:20:54

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: pat_speeder

I’m so sorry, Philippe. The setting is global: I don’t know how to select by occurrences (that’s very complex; maybe by ID associated to the script tag, I need to try)…


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#114 2024-05-13 07:35:13

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,162
Website

Re: pat_speeder

Pat64 wrote #337186:

I’m so sorry, Philippe. The setting is global: I don’t know how to select by occurrences (that’s very complex; maybe by ID associated to the script tag, I need to try)…

Was afraid so :-( Thanks anyway.
(If you ever have a bright idea how to eventually solve this, wave a little and I’ll try testing)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#115 2024-05-14 05:30:45

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,081
Website GitHub Mastodon Twitter

Re: pat_speeder

colak wrote #337183:

You have mail. Let me know if it did not arrive.

Hi Patrick, have you received the email?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#116 2024-05-14 14:12:52

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: pat_speeder

I’m afraid I received nothing.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#117 2024-05-15 05:21:11

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,081
Website GitHub Mastodon Twitter

Re: pat_speeder

Pat64 wrote #337189:

I’m afraid I received nothing.

I’ve send you a separate email. Many thanks for looking into this.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#118 2024-05-16 00:59:25

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: pat_speeder

Done.
The Neme website run with the latest version of the plugin.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#119 2024-05-16 08:31:16

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,081
Website GitHub Mastodon Twitter

Re: pat_speeder

Thanks so much. All’s working as expected now.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

  1. Index
  2. » Plugin support
  3. » pat_speeder

Board footer

Powered by FluxBB