Commit b896437d authored by Philip Müller's avatar Philip Müller
Browse files

Merge branch 'master' into 'master'

Update ms-office-online

See merge request !13
parents 06a9a6c4 7bd44475
#!/usr/bin/env python
try:
# Testing locally
from Application import JWebApp
except ImportError:
# Production
from JAK.Application import JWebApp
from JAK.Application import JWebApp
def app():
def office():
# v2.0.0
start = "https://office.live.com"
icon = "/usr/share/pixmaps/ms-office.png"
adverts = "tpc.googlesyndication.com", "googleads.g.doubleclick.net", "tag.sp.advertising.com",\
"banner.advertising.com", "cdn.bannerflow.com", "acdn.adnxs.com"
tab_only_allow = "office.live.com", "www.office.com", "forms.office.", "people.live.com", "onedrive.",\
"d.docs.live.", "www.onenote.", "outlook.", "www.outlook.", "sway.office.com", "1drv.ms/", \
"to-do.microsoft.com/", "word-edit.officeapps.live", "calendar.live.", "login.live.com",\
"login.microsoftonline.com/", "onenote"
tab_only_allow = "[a-z]*\.live.com", "www.office.com", "forms.office.com", "onedrive.", "d.docs.live.",\
"www.onenote.", "outlook.", "www.outlook.", "sway.office.com", "1drv.ms/", "to-do.microsoft.com/",\
"[a-z]*\.officeapps.live", "https://www.dropbox.com", "login.microsoftonline.com/", "onenote",\
"sway.com", "[a-z]*\.flow\.", "flow.", "[a-z]*\.sharepoint.com"
css_hide = ".hero-section, .tiles-section, a[href*='skype'], a[href*='bing'], a[href*='msn'], \
a[href*='https://g.live.com'], ._14PqNbws6gkP3kvU8nzH0G {display:none !important;}"
deny = "account", "support", "web.skype", "www.microsoft", "store.office.com", "msn.com", "bing.",\
deny = "account.microsoft", "support", "web.skype", "www.microsoft", "store.office.com", "msn.com", "bing.",\
"products.office", "go.microsoft.com", "privacy."
rules = {"WebBrowserTab": tab_only_allow, "WebBrowserWindow": deny, "block": adverts}
""" Icons need to be in a subfolder of the application
toolbar = ({"name": "Office", "url": "https://office.live.com", "icon": "icon/ms-office.png"},
{"name": "Excel", "url": "https://office.live.com/start/Excel.aspx?", "icon": "icon/ms-excel.png"},
{"name": "Word", "url": "https://office.live.com/start/Word.aspx?", "icon": "icon/ms-word.png"},
{"name": "PowerPoint", "url": "https://office.live.com/start/PowerPoint.aspx?", "icon": "icon/ms-powerpoint.png"},
{"name": "OutLook", "url": "https://outlook.com", "icon": "icon/ms-outlook.png"},
{"name": "OneNote", "url": "https://www.onenote.com", "icon": "icon/ms-onenote.png"})
"""
toolbar = {"name": "Office", "url": "https://office.live.com"},\
{"name": "Excel", "url": "https://office.live.com/start/Excel.aspx?"},\
{"name": "Word", "url": "https://office.live.com/start/Word.aspx?"},\
{"name": "PowerPoint", "url": "https://office.live.com/start/PowerPoint.aspx?"},\
{"name": "OneNote", "url": "https://www.onenote.com"},\
{"name": "Outlook", "url": "https://outlook.live.com"},\
{"name": "Calendar", "url": "https://outlook.live.com/calendar/"},\
{"name": "People", "url": "https://outlook.live.com/people/"},\
{"name": "Photos", "url": "https://outlook.live.com/files/images/"},\
{"name": "Tasks", "url": "https://outlook.live.com/owa/"},\
{"name": "Forms", "url": "https://forms.office.com"},\
{"name": "Flow", "url": "https://flow.microsoft.com"},\
{"name": "Sway", "url": "https://sway.office.com"},\
{"name": "OneDrive", "url": "https://onedrive.live.com"},\
{"name": "DropBox", "url": "https://www.dropbox.com"}
webapp = JWebApp(title="Microsoft Office Online", icon=icon, web_contents=start, online=True,
cookies_path="microsoft", url_rules=rules, custom_css=css_hide)
cookies_path="microsoft", url_rules=rules, custom_css=css_hide, toolbar=toolbar)
return webapp
app().run()
office().run()
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment