ShareShortcuts

蘋果日報免登記會員🍎

免登記成為會員都可安心睇蘋果日報🍎 無需成為蘋果日報會員都可安心睇新聞,免卻私隱煩惱

quentinpro
Fork “蘋果日報免登記會員🍎”

Built something new on top of this Shortcut? Share it as a fork: it becomes a Shortcut of your own, which you manage, and both pages link to each other so quentinpro gets credit.

  1. 1Get the Shortcut and change it in the Shortcuts app. Give it a name of its own.
  2. 2Share it from the Shortcuts app and copy the iCloud link.
  3. 3Come back here, paste the link and describe what is different, e.g. “Added a step that uses Apple Intelligence to personalise the text.”
Downloads
68K
Saved
0
Actions
1
Category
API
Version
1.0
Language
EN

免登記成為會員都可安心睇蘋果日報🍎

無需成為蘋果日報會員都可安心睇新聞,免卻私隱煩惱

https://cutt.ly/apple-unblock

What's New

Version 1.0

First release

Version History
1.0 Jul 17, 2019

First release

What it does

1 action
  1. Run JavaScript on Web Page

View as code
Beta

Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.

#include 'actions/web'
#define color red
#define glyph apple

runJavaScriptOnWebpage("/*\n\n\n\n\n\n\n蘋果日報免登記會員🍎\n\n\n\n\n\n\n\n*/\nconsole.log(\"--- SCRIPT STARTED ---\");\ntry {\n\tconsole.log(\"--- stopping DOM loading ---\");\n\tstop();\n\n\tconsole.log(\"--- overwritting blocking JS ---\");\n\t(function overwrite(link) {\n\t\tvar xhr = new XMLHttpRequest();\n\t\txhr.open('GET', link.href);\n\t\txhr.onload = () => {\n\t\t\t// HK, US\n\t\t\tvar html = xhr.responseText.replace('function uReadDisplayMsgBox(showdef){', 'function uReadDisplayMsgBox(showdef){}\nfunction xxx(showdef){');\n\t\t\thtml = html.replace('function uReadDisplayMsgBox(showdef, atype){', 'function uReadDisplayMsgBox(showdef, atype){}\nfunction xxx(showdef, atype){');\n\t\t\t// HK mobile\n\t\t\thtml = html.replace('function uReadPrompt(content,msgtype,vdoimg){', 'function uReadPrompt(content,msgtype,vdoimg){}\nfunction xxx(content,msgtype,vdoimg){');\n\t\t\t// TW\n\t\t\thtml = html.replace('var effects = function(e,val){', 'var effects = function(e,val){$(\".ndAritcle_headPic,.ndArticle_margin,.mediabox,#playerVideo,.articulum\").show();};\nvar effectsx = function(e,val){');\n\t\t\thtml = html.replace('.parent().remove();', '.parent();');\n\t\t\thtml = html.replace('class=\"ndArticle_margin\" style=\"display: none;\"', 'class=\"ndArticle_margin\"');\n\t\t\t// 04JUL2019\n\t\t\thtml = html.replace(/visibility: hidden;/g, '');\n\t\t\t// nextmag\n\t\t\thtml = html.replace('<div class=\"article-content\">', '<div class=\"article-content\" style=\"display:block!important\">');\n\t\t\t// 果燃台\n\t\t\tif (link.href.substr(0, 49) == 'https://hk.feature.appledaily.com/goodestchannel/' && link.href.substr(-2) != '.js')\n\t\t\t\thtml += \"<script>function setBanPaidFalse(){if(document.querySelector('.videoPlayer')!=null && document.querySelector('.videoPlayer').__vue__.banPaid){document.querySelector('.videoPlayer').__vue__.banPaid = false;}} var r = setInterval(setBanPaidFalse, 1000);</script>\";\n\t\t\t// 蘋果台\n\t\t\tif (link.href.substr(0, 43) == 'https://tw.feature.appledaily.com/applepie/' && link.href.substr(-2) != '.js')\n\t\t\t\thtml += \"<script>function setBanPaidFalse(){if(document.querySelector('.videoPlayer')!=null && document.querySelector('.videoPlayer').__vue__.banPaid){document.querySelector('.videoPlayer').__vue__.banPaid = false;}} var r = setInterval(setBanPaidFalse, 1000);</script>\";\n\t\t\t// 飲食男女\n\t\t\thtml = html.replace('function blockContent() {', 'function blockContent() {}\nfunction xxx() {');\n\t\t\t// 台灣會員專區\n\t\t\thtml = html.replace(/hideContent:'nm-main-articles',/g, \"hideContent:'nm-main-articlesxxx',\");\n\t\t\thtml = html.replace(\".nm-main-articles {display:none;}\", '');\n\t\t\thtml = html.replace('id=\"video_player\"', 'id=\"video_playerx\"');\n\t\t\thtml = html.replace('anvatoPlayerID = \"video_player\"', 'anvatoPlayerID = \"video_playerx\"');\n\t\t\t\n\t\t\tdocument.open();\n\t\t\tdocument.write(html);\n\t\t\tdocument.close();\n\t\t};\n\t\txhr.send();\n\t})(location);\n} catch (ex) {\n\tconsole.log(\"--- SCRIPT Error: \" + ex.message + \" ---\");\n}\nconsole.log(\"--- SCRIPT ENDED ---\");\ncompletion();")
Open in Cherri Playground Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.

Ratings & Reviews

Write a Review
–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings

No reviews yet. Be the first to share what you think!

Advertisement

You Might Also Like

See All
Advertisement