Skip to content

Commit

Permalink
init for v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
alloylab committed Feb 7, 2024
1 parent 8ed5f64 commit 0efd241
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
4 changes: 4 additions & 0 deletions cleanup/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
setTimeout(function () {
$('.js-rental-applications-total').attr('href', '/rental_applications').removeAttr('target');
$('a[href="/v_plus_services_marketplace/leasing_signals"]').closest('li').hide();
}, 1000);
26 changes: 26 additions & 0 deletions cleanup/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* Increase Main Container Width */
#content .main-container{
max-width:100% !important;
}

/* Increase Search Bar Width */
div[data-search-term] {
max-width:800px !important;
}

/* Fix Menu Overlay-ing Search */
#sidebar {
z-index:1 !important;
}

/* Hide Stuff */
#add_ons_link,
.graph-table-toggle,
#leasing-activity-income-verification,
#online_payments .dashboard-widget__subtitle,
.main-container .js-footer,
.intercom-lightweight-app,
#logo {
display:none !important;
visibility:hidden !important;
}
21 changes: 21 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "Appfolio Addons",
"manifest_version": 3,
"version": "1.1.0",
"description": "This extension cleans up annoying things within AF UI and add some features in browser.",
"host_permissions": ["https://*.appfolio.com/*"],
"content_scripts": [
{
"matches": ["https://*.appfolio.com/*"],
"css": [
"cleanup/styles.css"
],
"js": [
"vendor/jquery.min.js",
"vendor/showdown.min.js",
"cleanup/script.js",
"notes/script.js"
]
}
]
}
18 changes: 18 additions & 0 deletions notes/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
setTimeout(function () {
let decodeHTML = function (html) {
let txt = document.createElement('textarea');
txt.innerHTML = html;
return txt.value;
};

let note_contents = document.getElementsByClassName('note__contents');

for (let i = 0, l = note_contents.length; i < l; i++) {
let contentElement = note_contents[i].getElementsByClassName('js-note-text')[0];

let content = decodeHTML(contentElement.innerHTML.replace(/<\bspan\b>/g, '').replace(/<\/\bspan\b>/g, '').trim());

let converter = new showdown.Converter();
contentElement.innerHTML = converter.makeHtml(content);
}
}, 1000);
2 changes: 2 additions & 0 deletions vendor/jquery.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions vendor/showdown.min.js

Large diffs are not rendered by default.

0 comments on commit 0efd241

Please sign in to comment.