From cba4ffa8a1ff4dd06f2842c7cf9fee234b4de0b1 Mon Sep 17 00:00:00 2001 From: Claudio-Emmolo <113107618+Claudio-Emmolo@users.noreply.github.com> Date: Tue, 2 Jul 2024 10:32:24 +0200 Subject: [PATCH 1/4] Add github action for purge-cnd cache --- .github/workflows/purge-cdn.yml | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/purge-cdn.yml diff --git a/.github/workflows/purge-cdn.yml b/.github/workflows/purge-cdn.yml new file mode 100644 index 0000000..790be56 --- /dev/null +++ b/.github/workflows/purge-cdn.yml @@ -0,0 +1,34 @@ +name: Flush Cache + +on: + release: + types: [published] + +jobs: + purge-jsdelivr-cache: + runs-on: ubuntu-20.04 + steps: + - uses: gacts/purge-jsdelivr-cache@v1 + with: + url: | + https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/button.js + https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/distico.js + https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/facebook.js + https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/faq.js + https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/index.js + https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/instagram.js + https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/leggianche.js + https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/mediahubPhoto.js + https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/product.js + https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/reddit.js + https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/searchPublicApi.js + https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/shortcodeList.js + https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/spoiler.js + https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/survey.js + https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/tiktok.js + https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/tmdb.js + https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/trivia.js + https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/twitter.js + https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/widgetbay.js + https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/youtube.js + From ab91232c26b69ab1fcbb2d0336400740f26e817a Mon Sep 17 00:00:00 2001 From: Claudio-Emmolo <113107618+Claudio-Emmolo@users.noreply.github.com> Date: Tue, 2 Jul 2024 10:33:40 +0200 Subject: [PATCH 2/4] Add github action for purge-cnd cache --- .github/workflows/purge-cdn.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/purge-cdn.yml b/.github/workflows/purge-cdn.yml index 790be56..528695e 100644 --- a/.github/workflows/purge-cdn.yml +++ b/.github/workflows/purge-cdn.yml @@ -19,6 +19,7 @@ jobs: https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/instagram.js https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/leggianche.js https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/mediahubPhoto.js + https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/previewAdv.js https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/product.js https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/reddit.js https://cdn.jsdelivr.net/gh/The-3Labs-Team/tinymce-laravel-shortcode-plus@1/src/searchPublicApi.js From e4886f7129e2f81f0238f01f4464bc42ccead095 Mon Sep 17 00:00:00 2001 From: Claudio-Emmolo <113107618+Claudio-Emmolo@users.noreply.github.com> Date: Tue, 2 Jul 2024 10:48:01 +0200 Subject: [PATCH 3/4] Remove Cpop shortcodes, add survey and products --- src/shortcodeList.js | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/src/shortcodeList.js b/src/shortcodeList.js index 5ab0d7a..14bdd43 100644 --- a/src/shortcodeList.js +++ b/src/shortcodeList.js @@ -88,34 +88,19 @@ tinymce.PluginManager.add('shortcodeList', function (editor, url) { description: 'Insert a tiktok frame' }, { - title: 'Movie - CulturaPop*', - code: '[movie id="1"]', - description: 'Insert a movie' - }, - { - title: 'TV - CulturaPop*', - code: '[tv id="1"]', - description: 'Insert a TV show' - }, - { - title: 'Video - CulturaPop*', - code: '[video id="1"]', - description: 'Insert a video' - }, - { - title: 'Quiz - CulturaPop*', - code: '[quiz id="1"]', - description: 'Insert a quiz' + title: 'Merchandise Product - Spaziogames*', + code: '[product id="1,2,3" amztag="nosp-guide" ebaycampaignid="123456"]', + description: 'Insert a Merchandise Product' }, { - title: 'Challenge - CulturaPop*', - code: '[challenge id="1"]', - description: 'Insert a challenge' + title: 'Survey', + code: '[survey id="1"]', + description: 'Insert a survey in the article' }, { - title: 'Merchandise Product - Spaziogames*', - code: '[product id="1,2,3" amztag="nosp-guide" ebaycampaignid="123456"]', - description: 'Insert a Merchandise Product' + title: 'Products', + code: '[products]', + description: 'Move the products block in BestOf article - Tom\'s Hardware* Spaziogames*' } ] From f59fa1a740d2e5c36deb935cd146664cff52e071 Mon Sep 17 00:00:00 2001 From: Claudio-Emmolo <113107618+Claudio-Emmolo@users.noreply.github.com> Date: Tue, 2 Jul 2024 10:49:10 +0200 Subject: [PATCH 4/4] Order shortcodes by title --- src/shortcodeList.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shortcodeList.js b/src/shortcodeList.js index 14bdd43..5f2409a 100644 --- a/src/shortcodeList.js +++ b/src/shortcodeList.js @@ -103,6 +103,7 @@ tinymce.PluginManager.add('shortcodeList', function (editor, url) { description: 'Move the products block in BestOf article - Tom\'s Hardware* Spaziogames*' } ] + shortcodes.sort((a, b) => a.title.localeCompare(b.title)) const content = `