Squarespace code injecting - code-injection

I injected <script> tags into my squarespace template making the <main> display:none. Now I cannot edit that section through squarespace because it is gone. Recommendations how to get it back without starting from scratch?
$( "#page" ).css( "display", "none" );
was the code I injected into the HTML.
Thank you in advance.

Its hard to understand what you are asking, but i'll assume that you added that single line of code, it hides everything when you navigate to your site page, and you are not sure how to go back to the adminstration page to remove that line of code?
You used "code injection" to insert that code. You can go back to that same code injection location and remove that line of code. The squarespace manual has documentation on code injection. If you are not sure where to go to get back to the administration pages, you can enter a url like this: https://<yoursite>/config for example: https://mysquarespacesite.com/config

For your problem I have one solution using Chrome inspector console tool(inbuilt tool of Chrome browser), make sure you open your website on Chrome browser with login to your squarespace website and follow these steps:
On your website homepage for example: https://<yoursite>/config, Click F12 from your keyboard OR right click using mouse and click on Inspect which will show you inspector mode of Chrome browser
Go to Console tab from inspector tool
Paste following code into Console:
document.getElementById('page').style.display = "block";
Hit enter and your <main> tag will be set as display block
Now your <main> section should be visible, go to code injection of your website and permanently remove display : none which will fix your website hiding <main> section problem for forever
Following are pictures of every step:
Note: I have tested this code into demo template of Squarespace website: https://bedford-demo.squarespace.com

Use the below code. Your code will execute only when you are not logged in as administrator.
if (window.top.location.href == window.self.location.href) {
$("#page").css("display", "none");
}

Related

Facebook tab not working in IE, works on website URL

I've created this facebook tab, and for some reason it will not work in IE once implemented into facebook. It DOES work on the website url where it is placed. The url is: https://www.enterprisebanking.com/assets/fb-products/
The tab works great in every browser except for IE. In IE, the entire middle section is missing and the tabs are unable to be clicked on.
Here's a screenshot of how the tab looks in IE: http://grab.by/s9Qu
Any advice is appreciated.
Dan
You have a console.log in https://www.enterprisebanking.com/assets/fb-products/js/tabs.js this will cause it to break in IE.

Facebook Send button does not show up on Gwt popup panel?

I'm trying to get Facebook send or like button display on GWT popup panel and I am not successful. When inspecting the generated HTML, facebook HTML button looks properly inserted into but it just does not show up. Save Facebook button works well in html page (not on GWT panel).
Have you ever had success in displaying Facebook Send or Like or Share button in GWT? I know I ca implement FB Like button myself using API or other libraries. But I do it need that. I need standard Facebook Send button to be used in my GWT application.
Please advise me if you have experience and were successful.
Thank you very much!
I had a similar problem, and it was because, in the html file's script tag, I had changed and not updated the src="path" to a valid path. I had a wrong directory listed in the path. For me, it's correct now with:
<script type="text/javascript" src="clienttest/clienttest.nocache.js"></script>
I rebuilt, and the image appeared on the page. This problem was keeping the entry point module from loading.

"Like Button" does not appear when I paste plug-in code into HTML snippet on iweb?

Please help. I've spent hours on this. With Twitter I had no trouble adding a button to my website using iWeb but with facebook.....
The best way I can describe my problem is this: I go through all of the required steps to obtain the plug-in for my facebook page (http://www.facebook.com/thekitchensinkwma). I then "get code", copy the code, drag HTML Snippet onto my desired page in iWeb, then paste the code into the appropriate window (BTW: I've tried all 3 codes several times). When Click the "Apply" button, the "Like" button does not appear.
I'm at my whit's end! Please help. Thanks.
Martin
Without seeing the page I have two initial thoughts you can run down:
Your CMS [iWeb or whatever you are using] is altering the fb-root tag which is required for the button to show. Twitter only uses javascript.
Your page is appearing via iframe, javascript or something from the system is causing Facebook to believe you may be hiding the button to fake a click.
If this is happening with both the iFrame and Scripted method a url will be helpful as it may be more complex.
Try adding <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> to the HTML-tag.
Would be easier if you provided a link though.

How do I see what jQuery Mobile loaded in the background?

Using jQuery Mobile, I have seen how it adds to the existing DOM when links are clicked and a related page is served. Then, when ready, it switches to that new data-role="page". But when I do a "view source" in the browser (Google Chrome or Mozilla Firefox), I see the original page, as delivered, without the additional things loaded later (DOM injections). How can I see what the browser really has (post-render HTML)? If it happens to be a JavaScript solution, please don't presume I know where to put it and how to trigger it to show the content.
In Chrome: Wrench > Tools > Developer Tools would be a way to see the 'live' DOM.

Facebook Custom IFrame Tabs and Internet Explorer 8 Issue

I have created my first IFrame App in facebook (custom tab), and all the IFrame is directing to is a simple PHP page, with HTML tags stating Hello World...
However, this is showing up in Firefox and Chrome, but not in Internet Explorer - and I cannot figure out why; even tried googling it to no avail.
Please help me! I cannot move forward without solving this issue!!
did you already fixed this? I figured out that the Internet Explorer has a differend handling for parameters. I faced the same issue: my cutom tab (iframe) was working perfectly on Firefox, Opera, Chrome, but never shown IN IE7+8.
Later I realized that I added a questionmark to the URL, but w/o any parameter, like this:
http://www.mydomain.com/mypage.html?
Solution: If you just only want to embedd an html page, you don't need to do this any longer. Just create your Facebook app, go to "Facebook Integration", scroll down to "Page Tabs", add a "Tab Name" and the "Tab URL". Don't add a "?" to the Tab URL.
Once I removed the "?" the custom iframe tab is shown in Internet Explorer 7 and 8.