PageSourceSearch

https://macklin.ca/government/departments_contacts.html

html macklin.ca collected 2026-10-02 13:04:40 UTC 26,011 bytes, 262 lines download raw bytes

1
2<!DOCTYPE html>
3<html lang="en" class="">
4<head>
5<meta charset="utf-8">
6<meta name="viewport" content="width=device-width, initial-scale=1">
7<title>Departments & Contacts - Town of Macklin, SK</title>
8<meta name="description" content="Find contact information for the various departments of the Town of Macklin, SK. Get in touch with town officials and departments for services, inquiries, and support to help you with all municipal matters."/>
9<meta name="keywords" content="Macklin departments, town of Macklin contacts, municipal departments Macklin, Macklin town office, Macklin SK government contacts, Macklin municipal services, town administration Macklin"/>
10<meta name="format-detection" content="telephone=no"/>
11<meta property="og:title" content="Departments & Contacts - Town of Macklin, SK">
12<meta property="og:type" content="website">
13<meta property="og:url" content="https://macklin.ca/government/departments_contacts.html">
14<meta property="og:description" content="Find contact information for the various departments of the Town of Macklin, SK. Get in touch with town officials and departments for services, inquiries, and support to help you with all municipal matters.">
15<meta property="og:image" content="https://macklin.ca/images/logo.png">
16<meta name="twitter:card" content="summary_large_image">
17<meta name="twitter:title" content="Departments & Contacts - Town of Macklin, SK"/>
18<meta name="twitter:image" content="https://macklin.ca/images/logo.png"/>
19<meta name="twitter:image:alt" content="Find contact information for the various departments of the Town of Macklin, SK. Get in touch with town officials and departments for services, inquiries, and support to help you with all municipal matters.">
20<link rel="apple-touch-icon" sizes="180x180" href="/xapple-touch-icon.png.pagespeed.ic.XKf_d4DQ1A.webp">
21<link rel="icon" type="image/png" sizes="32x32" href="/xfavicon-32x32.png.pagespeed.ic.w98oGtazro.webp">
22<link rel="icon" type="image/png" sizes="16x16" href="/xfavicon-16x16.png.pagespeed.ic.wT36jsnw_d.webp">
23<link rel="manifest" href="/site.webmanifest">
24<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#000000">
25<meta name="msapplication-TileColor" content="#ffffff">
26<meta name="theme-color" content="#ffffff">
27<!--[if lt IE 10]>
28	<div style='background: #212121; padding: 10px 0; box-shadow: 3px 3px 5px 0 rgba(0,0,0,.3); clear: both; text-align:center; position: relative; z-index:1;'>
29	  <a href="http://windows.microsoft.com/en-US/internet-explorer/..">
30			<img src="/images/ie8-panel/warning_bar_0000_us.jpg" border="0" height="42" width="820"
31				  alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today."/>
32	  </a>
33	</div>
34	
34<script src="/js/html5shiv.min.js"></script>
34
35	<![endif]-->
36<script language="JavaScript1.1" type="text/javascript">function EasyEditLoadEditor(){}</script>
36
37<link rel="preconnect" href="https://fonts.googleapis.com">
38<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
39<link href="https://fonts.googleapis.com/css2?family=Holtwood+One+SC&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap" rel="stylesheet">
40<link href="//static.mrwebsites.ca/fontawesome/v6/css/fontawesome.min.css" rel="stylesheet" crossorigin="anonymous">
41<link href="//static.mrwebsites.ca/fontawesome/v6/css/brands.min.css" rel="stylesheet" crossorigin="anonymous">
42<link href="//static.mrwebsites.ca/fontawesome/v6/css/solid.min.css" rel="stylesheet" crossorigin="anonymous">
43<meta name="includeCSS" content="marker">
44<link rel="stylesheet" href="/css/A.defaults.css,qv=1.0.pagespeed.cf.lQSPZ8noMP.css">
45<link id="themeStylesheet" rel="stylesheet" href="/css/A.style.css,qv=1.0.pagespeed.cf.XcW_BYz7vA.css">
46<link rel="stylesheet" href="/css/A.mobile.css,qv=1.1.pagespeed.cf.V2oDgK0g1a.css" media="screen and (max-width: 991px)">
47<link rel="stylesheet" href="/css/A.desktop.css,qv=1.0.pagespeed.cf.d0itxCgX8r.css" media="screen and (min-width: 992px)">
48<link rel="stylesheet" href="/css/features/A.alerts.css+contact.css+business_directory.css+filebrowser.css+gallery.css+news.css+poll.css+events.css,Mcc.KFZQZkZcx1.css.pagespeed.cf.yIi019J4B7.css"/><link rel="stylesheet" href="/css/features/A.search.css+slideshow.css,Mcc.L3F0T7LR9X.css.pagespeed.cf.iXKH4SBZL3.css"/>
vendor: 64 bytes, lines 48-49
48
49<script async src="https://www.googletagmanager.com/gtag/js?id=
49G-9YNZDSS7JR
vendor: 12 bytes, line 49
49"></script>
50<script>
vendor: 118 bytes, line 50
50window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('js',new Date());gtag('config','
50G-9YNZDSS7JR
vendor: 3 bytes, line 50
50');
50</script>
50
51</head>
52<body id="secondary"><noscript><meta HTTP-EQUIV="refresh" content="0;url='https://macklin.ca/government/departments_contacts.html?PageSpeed=noscript'" /><style><!--table,div,span,font,p{display:none} --></style><div style="display:block">Please click <a href="https://macklin.ca/government/departments_contacts.html?PageSpeed=noscript">here</a> if you are not redirected within a few seconds.</div></noscript>
53<div class="page">
54<header class="sticky_wrapper">
55<div class="header_inner">
56<div class="mr-navbar-brand">
57<div class="logo">
58<img src="/images/xlogo-bw.png.pagespeed.ic._voh0NYBMd.webp" alt="logo" class="desktop" width="166" height="150">
59</div>
60</div>
61<div class="mr-navbar-subpanel ">
62<div class="mr-navbar-upper">
63<div class="mr-navbar-upper_left">
64</div>
65<div class="mr-navbar-upper_right">
66<ul class="navigation_extra list-inline">
67<li><a class="navigation_extra_toggle"><span>More</span></a>
68<ul class="features_nav">
69<li><a href="/home.html" target="" class="features_nav_item"><i class="fa fa-home-lg"></i><span>Home</span></a></li>
70<li><a href="/events.html" target="" class="features_nav_item"><i class="fa fa-calendar-alt"></i><span>Events</span></a></li>
71<li><a href="/business_directory.html" target="" class="features_nav_item"><i class="fa fa-address-book"></i><span>Business Directory</span></a></li>
72<li><a href="/sitemap.html" target="" class="features_nav_item"><i class="fa fa-sitemap"></i><span>Sitemap</span></a></li>
73</ul>
74</li>
75</ul>
76<script>document.getElementById('toggleButton').addEventListener('click',function(){var themeStylesheet=document.getElementById('themeStylesheet');var currentHref=themeStylesheet.getAttribute('href');var newHref=currentHref==='css/style.css'?'css/style_light.css':'css/style.css';themeStylesheet.setAttribute('href',newHref);var body=document.body;body.style.display='none';body.offsetHeight;body.style.display='block';});</script>
76
77<div class="mr_search">
78<form action="/search.html" method="post" id="mr_search_form" name="Search" role="search">
79<input type="text" name="keywords" id="mr_search" placeholder="Search for topics, resources, or articles..." required="" aria-label="Search Site">
80<button type="submit" id="mr_search_submit" name="Submit_Search" aria-label="Submit Search">
81<i class="fas fa-search" role="presentation"></i>
82</button>
83<button class="search-cover" type="button" aria-label="Search"></button>
84</form>
85</div>
86</div>
87</div>
88<div class="mr-navbar-toggle">
89<span></span>
90</div>
91<div class="mr-upper-toggle">
92<span></span>
93</div>
94</div>
95</div>
96<nav class="mr-navbar-nav-wrap sticky">
97<ul class="level-0 mr-navbar-nav"><li class="navitemid-9 current current-parent  has_subnav"><a href="/government.html"><span>Government</span></a><span class="subnav_toggle"></span><ul class="level-1 mr-navbar-dropdown"><li class="navitemid-15  "><a href="/government/mayor_council.html"><span>Mayor & Council</span></a></li><li class="navitemid-16 active current-item  "><a href="/government/departments_contacts.html"><span>Departments & Contacts</span></a></li><li class="navitemid-17  "><a href="/government/history.html"><span>History</span></a></li><li class="navitemid-18  "><a href="/government/public_notices.html"><span>Public Notices</span></a></li><li class="navitemid-19  has_subnav"><a href="/government/bylaws.html"><span>Bylaws</span></a><span class="subnav_toggle"></span><ul class="level-2 mr-navbar-dropdown"><li class="navitemid-35  "><a href="/mrws/uploaded_files/dir_0_12/Traffic%20Bylaw.pdf" TARGET="_BLANK"><span>Traffic</span></a></li><li class="navitemid-36  "><a href="/mrws/uploaded_files/dir_0_12/Noise%20Bylaw.pdf" TARGET="_BLANK"><span>Noise</span></a></li><li class="navitemid-37  "><a href="/mrws/uploaded_files/dir_0_12/Animal%20Bylaw.pdf" TARGET="_BLANK"><span>Animal Control</span></a></li><li class="navitemid-38  "><a href="/mrws/uploaded_files/dir_0_12/Business%20License%20Bylaw.pdf" TARGET="_BLANK"><span>Business Licensing</span></a></li><li class="navitemid-40  "><a href="/mrws/uploaded_files/dir_0_12/Nuisance%20Bylaw.pdf" TARGET="_BLANK"><span>Nuisance</span></a></li><li class="navitemid-41  "><a href="/mrws/uploaded_files/dir_0_12/Public%20Notice%20Bylaw.pdf" TARGET="_BLANK"><span>Public Notice</span></a></li><li class="navitemid-42  "><a href="/mrws/uploaded_files/dir_0_12/Backyard%20Fire%20Bylaw.pdf" TARGET="_BLANK"><span>Open Outdoor Fires</span></a></li></ul></li></ul></li><li class="navitemid-10  has_subnav"><a href="/living.html"><span>Living</span></a><span class="subnav_toggle"></span><ul class="level-1 mr-navbar-dropdown"><li class="navitemid-20  has_subnav"><a href="/living/services.html"><span>Services</span></a><span class="subnav_toggle"></span><ul class="level-2 mr-navbar-dropdown"><li class="navitemid-43  "><a href="/living/services/waste_recycle.html"><span>Waste & Recycle</span></a></li><li class="navitemid-44  "><a href="/living/services/water_sewer.html"><span>Water & Sewer</span></a></li><li class="navitemid-45  "><a href="/living/services/animal_control.html"><span>Animal Control</span></a></li><li class="navitemid-46  "><a href="/living/services/emergency_services.html"><span>Emergency Services</span></a></li><li class="navitemid-47  "><a href="https://www.facebook.com/people/Macklin-District-Crime-Watch-Division/100066551291536/" TARGET="_BLANK"><span>Macklin & District Crime Watch Division</span></a></li><li class="navitemid-48  "><a href="/living/services/senior_living_facilities.html"><span>Senior Living Facilities</span></a></li><li class="navitemid-49  "><a href="https://www.livingskysd.ca/" TARGET="_BLANK"><span>Education</span></a></li><li class="navitemid-50  "><a href="https://www.facebook.com/macklindaycare/" TARGET="_BLANK"><span>Daycare</span></a></li><li class="navitemid-51  "><a href="/living/services/cemetery.html"><span>Cemetery</span></a></li></ul></li><li class="navitemid-21  has_subnav"><a href="/living/parks_recreation.html"><span>Parks & Recreation</span></a><span class="subnav_toggle"></span><ul class="level-2 mr-navbar-dropdown"><li class="navitemid-52  "><a href="http://www.macklinminorhockey.com/" TARGET="_BLANK"><span>Hockey Arena</span></a></li><li class="navitemid-53  "><a href="https://www.facebook.com/people/Macklin-Skating-Club/100077470749131/" TARGET="_BLANK"><span>
97Skating Club</span></a></li><li class="navitemid-54  "><a href="/living/parks_recreation/halls_meetings.html"><span>Halls & Meetings</span></a></li><li class="navitemid-55  "><a href="https://www.facebook.com/people/Macklin-Curling-Club/100054615632077/" TARGET="_BLANK"><span>Curling</span></a></li><li class="navitemid-56  "><a href="http://www.macklinswimmingpool.com/" TARGET="_BLANK"><span>Aquatic Centre</span></a></li><li class="navitemid-57  "><a href="http://saskregionalparks.ca/park/macklin-lake/" TARGET="_BLANK"><span>Golf</span></a></li><li class="navitemid-58  "><a href="http://www.facebook.com/Macklin-Minor-Ball-Association-607499716006969/" TARGET="_BLANK"><span>Ball Diamond</span></a></li><li class="navitemid-59  "><a href="http://www.facebook.com/Macklin-Soccer-Association-769176079817552/" TARGET="_BLANK"><span>Soccer</span></a></li><li class="navitemid-60  "><a href="http://www.facebook.com/siebenschoolofdance/" TARGET="_BLANK"><span>Dance</span></a></li><li class="navitemid-61  "><a href="http://saskregionalparks.ca/park/macklin-lake/" TARGET="_BLANK"><span>Camping</span></a></li><li class="navitemid-62  "><a href="http://lakelandlibrary.ca/spm/branch/175" TARGET="_BLANK"><span>Library</span></a></li><li class="navitemid-63  "><a href="/living/parks_recreation/parks.html" TARGET="_BLANK"><span>Parks</span></a></li></ul></li><li class="navitemid-22  has_subnav"><a href="/living/planning_development.html"><span>Planning & Development</span></a><span class="subnav_toggle"></span><ul class="level-2 mr-navbar-dropdown"><li class="navitemid-64  "><a href="/mrws/uploaded_files/dir_0_19/Zoning%20&%20Development.pdf" TARGET="_BLANK"><span>Zoning & Development</span></a></li><li class="navitemid-65  "><a href="/living/planning_development/tax_incentive_policy.html"><span>Tax Incentive Policy</span></a></li><li class="navitemid-66  "><a href="/living/planning_development/tax_assessment.html"><span>Tax & Assessment</span></a></li><li class="navitemid-67  "><a href="/mrws/uploaded_files/dir_0_19/Official%20Community%20Plan.pdf" TARGET="_BLANK"><span>Official Community Plan</span></a></li><li class="navitemid-68  "><a href="/living/planning_development/forms_permits.html"><span>Forms & Permits</span></a></li></ul></li><li class="navitemid-23  "><a href="/living/clubs_organizations.html"><span>Clubs & Organizations</span></a></li><li class="navitemid-24  "><a href="/living/places_of_worship.html"><span>Places of Worship</span></a></li></ul></li><li class="navitemid-13  has_subnav"><a href="/visiting.html"><span>Visiting</span></a><span class="subnav_toggle"></span><ul class="level-1 mr-navbar-dropdown"><li class="navitemid-25  has_subnav"><a href="/visiting/bunnock.html"><span>Bunnock</span></a><span class="subnav_toggle"></span><ul class="level-2 mr-navbar-dropdown"><li class="navitemid-69  "><a href="/visiting/bunnock/history.html"><span>History</span></a></li><li class="navitemid-70  "><a href="/visiting/bunnock/world_championships.html" TARGET="_BLANK"><span>World Championships</span></a></li><li class="navitemid-71  "><a href="/visiting/bunnock/itinerary.html"><span>Itinerary</span></a></li><li class="navitemid-72  "><a href="/visiting/bunnock/wall_of_fame.html"><span>Wall of Fame</span></a></li><li class="navitemid-73  "><a href="/visiting/bunnock/rules_of_the_game.html"><span>Rules of the Game</span></a></li></ul></li><li class="navitemid-26  has_subnav"><a href="/visiting/accomodations.html"><span>Accomodations</span></a><span class="subnav_toggle"></span><ul class="level-2 mr-navbar-dropdown"><li class="navitemid-74  "><a href="/visiting/accomodations/hotels_motels.html"><span>Hotels/Motels</span></a></li><li class="navitemid-75  "><a href="https://saskregionalparks.ca/park/macklin-lake/" TARGET="_BLANK"><span>Macklin Lake Regional Park</span></a></li></ul></li><li class="navitemid-27  has_subnav"><a href="/visiting/things_to_do.html"><span>Things to do</span></a><span class="subnav_toggle"></span><ul class="level-2 mr-navbar-dropdown"><li class="navitemid-76  "><a href="/events.html"><span>Events Calendar</span></a></li><li class="navitemid-77  "><a href="/visiting/things_to_do/tourist_booth.html"><span>Tourist Booth</span></a></li><li class="navitemid-78  "><a href="/visiting/things_to_do/museum.html"><span>Museum</span></a></li><li class="navitemid-79  "><a href="https://www.historicplaces.ca/en/rep-reg/place-lieu.aspx?id=3732" TARGET="_BLANK"><span>Historical Places</span></a></li><li class="navitemid-80  "><a href="https://bodoarchaeology.com/" TARGET="_BLANK"><span>Bodo Archaeological Society</span></a></li><li class="navitemid-81  "><a href="http://www.saskculture.ca/impact/success-stories/macklin-heritage-helps-define-community" TARGET="_BLANK"><span>Sask Culture</span></a></li><li class="navitemid-82  "><a href="/visiting/things_to_do/walking_trail.html"><span>Walking Trail</span></a></li></ul></li></ul></li><li class="navitemid-14  has_subnav"><a href="/business.html"><span>Business</span></a><span class="subnav_toggle"></span><ul class="level-1 mr-navbar-dropdown"><li class="navitemid-87  "><a href="/business_directory.html"><span>Business Directory</span></a></li><li class="navitemid-28  "><a href="/business/tax_incentive_policy.html"><span>Tax Incentive Policy</span></a></li><li class="navitemid-29  "><a href="/mrws/uploaded_files/dir_0_26/Zoning%20&%20Development.pdf" TARGET="_BLANK"><span>Zoning & Land Use</span></a></li><li class="navitemid-31  "><a href="/mrws/uploaded_files/dir_0_26/business%20%20license%20bylaw.pdf" TARGET="_BLANK"><span>Business License</span></a></li><li class="navitemid-32  "><a href="https://facebook.com/macklinchamber" TARGET="_BLANK"><span>Macklin Chamber of Commerce</span></a></li><li class="navitemid-33  "><a href="/mrws/uploaded_files/dir_0_26/EFT%20Application%20for%20vendors-Company.pdf" TARGET="_BLANK"><span>EFT Application for Vendors</span></a></li></ul></li><li class="navitemid-88  "><a href="/newsletters.html"><span>Newsletters</span></a></li></ul>
98</nav>
99</header>
100<div class="menushadow"></div>
101<main class="page-content">
102<div class="breadcrumbs">
103<h2>Departments & Contacts</h2>
104<ul>
105<li><a href="/home.html">Home</a></li>
106<li><a href="/government.html">Government</a></li><li><a>Departments & Contacts</a></li> </ul>
107</div>
108<section id="content" class="padding">
109<div class="container-fluid">
110<div class="row">
111<div class="col-md-12">
112<div class="">
113<div onClick="EasyEditLoadEditor('loc_main_content')" class="easyedit_editable" id="loc_main_content">
114<h3>Contact:</h3>
115<p>Town of Macklin<br/>PO Box 69<br/>Macklin, SK S0L 2C0</p>
116<p><strong>Email:</strong>&nbsp; [email protected]<br/><strong>Ph:</strong>&nbsp; (306) 753-2256<br/><strong>Fax:</strong>&nbsp; (306) 753-3234</p>
117<h3>Hours of Operation</h3>
118<p>Monday to Friday<br/>9:00am - 12:00pm &amp; 1:00pm - 5:00pm</p> </div>
119</div>
120<div class="nav_tiles"><h3 class="nav_header">More in this section</h3><ul class='mr-nav-tiles'><li><a href="/government/mayor_council.html"><div class='navitem_wrapper'><div class='pagename'><span class='pagenamelabel'>Mayor & Council</span></div><span class='pagedescription'>Discover the leadership of the Town of Macklin, SK. Meet our Mayor and Council members, learn about their roles, and stay informed about council meetings and decisions that shape our community.</span></div></a></li><li class='active current-item'><a href="/government/departments_contacts.html"><div class='navitem_wrapper'><div class='pagename'><span class='pagenamelabel'>Departments & Contacts</span></div><span class='pagedescription'>Find contact information for the various departments of the Town of Macklin, SK. Get in touch with town officials and departments for services, inquiries, and support to help you with all municipal matters.</span></div></a></li><li><a href="/government/history.html"><div class='navitem_wrapper'><div class='pagename'><span class='pagenamelabel'>History</span></div><span class='pagedescription'>Explore the rich history of the Town of Macklin, SK. Learn about the founding of our community, significant historical events, and landmarks that have shaped Macklin's heritage and culture over the years.</span></div></a></li><li><a href="/government/public_notices.html"><div class='navitem_wrapper'><div class='pagename'><span class='pagenamelabel'>Public Notices</span></div><span class='pagedescription'>Stay informed with the latest public notices from the Town of Macklin, SK. Find important announcements, community updates, and alerts that impact residents and visitors. Stay connected with your town’s news and events.</span></div></a></li><li><a href="/government/bylaws.html"><div class='navitem_wrapper'><div class='pagename'><span class='pagenamelabel'>Bylaws</span></div><span class='pagedescription'>Access the official bylaws of the Town of Macklin, SK. Review and understand the municipal regulations that govern our community, ensuring a safe and orderly environment for all residents and visitors.</span></div></a></li><li class='tile_spacer'></li><li class='tile_spacer'></li><li class='tile_spacer'></li><li class='tile_spacer'></li></ul></div> </div>
121</div>
122</section>
123</main>
124<footer class="page-footer">
125<section class="footer_content">
126<div class="footer_content_inner">
127<div class="footer_content_left">
128<div class="footer_content_cols">
129<div class="col_left">
130<img src="/images/xlogo-bw.png.pagespeed.ic._voh0NYBMd.webp" class="footer_logo" width="166" height="150">
131</div>
132<div class="col_right">
133<div class="contact_mail">
134P.O. Box 69, Macklin SK S0L 2C0
135</div>
136<div class="contact_phone">
137<a href="tel:3067532256">306-753-2256</a>
138</div>
139<div class="contact_fax">
140<a>306-753-3234</a>
141</div>
142<div class="contact_email">
143<a href="mailto:[email protected]">[email protected]</a>
144</div>
145<div class="contact_email">
146<a href="mailto:[email protected]">[email protected]</a>
147</div>
148</div>
149</div>
150</div>
151<div class="footer_content_right">
152<img src="/images/xfooterderrick.png.pagespeed.ic.4pDPIDHS14.webp" class="derrick" width="465" height="383">
153</div>
154</section>
155<section class="footer_copyright">
156<div class="footer_copyright_inner">
157<p><span>&copy; <span id="copyright-year"></span> Town of Macklin. All rights reserved.</span> <span style="white-space: nowrap;">Website Design by</span> <a href="//mrwebsites.ca" target="_blank" style="white-space: nowrap;" aria-label="Link opens in new tab">M.R. App
158&amp; Web Development
159Studio</a></p>
160</div>
161</section>
162</footer>
163</div>
164<script src="/js/script.js.pagespeed.ce.L6uyxfQuev.js" type="module"></script>
vendor: 1 bytes, line 164
164
165<script>
166    //function to toggle expanding of folder and document list shown on a page
167    function toggleFolder(event) {
168        event.stopPropagation();
169        const folderIcon = event.currentTarget.querySelector('i');
170        const folderContent = event.currentTarget.nextElementSibling;
171
172        if (folderContent) {
173            folderContent.classList.toggle('hidden');
174            if (folderContent.classList.contains('hidden')) {
175                // Change to closed folder icon
176                folderIcon.classList.remove('fa-folder-open');
177                folderIcon.classList.add('fa-folder');
178            } else {
179                // Change to open folder icon
180                folderIcon.classList.remove('fa-folder');
181                folderIcon.classList.add('fa-folder-open');
182            }
183        }
184    }
185
186    // Auto adjust float images based on screen width
187    document.addEventListener("DOMContentLoaded", function() {
188        const images = document.querySelectorAll('.easyedit_editable img[style*="float"]');
189        // Store the original sizes, float directions, and existing margins of images
190        const originalProperties = new Map();
191
192        images.forEach(img => {
193            let originalWidth = img.getAttribute('width') || img.offsetWidth; // Use attribute if available, else offsetWidth
194            let originalHeight = img.getAttribute('height') || img.offsetHeight; // Use attribute if available, else offsetHeight
195            originalProperties.set(img, {
196                width: originalWidth,
197                height: originalHeight,
198                float: img.style.float, // Store original float direction
199                marginLeft: img.style.marginLeft,
200                marginRight: img.style.marginRight
201            });
202        });
203
204        const marginSize = 20; // Margin size in pixels
205        const textSpace = 20; // Space required for text in character widths
206
207        function adjustImageWidth() {
208            images.forEach(img => {
209                const screenWidth = window.innerWidth;
210                const props = originalProperties.get(img);
211                const originalImgWidth = props.width;
212                const originalImgHeight = props.height;
213                const originalFloat = props.float;
214
215                // Calculate the remaining space, considering the marginSize
216                const remainingSpace = screenWidth - originalImgWidth - (marginSize * 2);
217
218                // Calculate textSpace character widths in pixels
219                const minSpace = parseFloat(getComputedStyle(document.body).fontSize) * textSpace;
220
221                if (remainingSpace < minSpace) {
222                    img.style.display = "block";
223                    img.style.width = `${originalImgWidth}px`;
224                    img.style.maxWidth = "100%";
225                    img.style.height = "auto"; // Maintain aspect ratio
226                    img.style.clear = "both";
227                    img.style.float = "none";
228                    img.style.marginLeft = "0";
229                    img.style.marginRight = "0";
230                    img.style.marginTop = `${marginSize}px`; // Add top margin
231                    img.style.marginBottom = `${marginSize}px`; // Add bottom margin
232                } else {
233                    img.style.display = "inline-block";
234                    img.style.width = `${originalImgWidth}px`;
235                    img.style.maxWidth = "100%";
236                    img.style.height = `${originalImgHeight}px`;
237                    img.style.float = originalFloat; // Restore original float direction
238                    img.style.clear = "";
239                    img.style.marginTop = "";
240                    img.style.marginBottom = "";
241
242                    // Adjust margins based on float direction
243                    if (originalFloat === 'left') {
244                        img.style.marginRight = `${marginSize}px`; // Add right margin
245                        img.style.marginLeft = props.marginLeft; // Restore original left margin
246                    } else if (originalFloat === 'right') {
247                        img.style.marginLeft = `${marginSize}px`; // Add left margin
248                        img.style.marginRight = props.marginRight; // Restore original right margin
249                    }
250                }
251            });
252        }
253
254        // Run on load
255        adjustImageWidth();
256
257        // Add event listener to run on window resize
258        window.addEventListener('resize', adjustImageWidth);
259
260    });
261</script>
261</body>
262</html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.