Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified the page style of google search results #74

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions googleCS.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
var st;
var x;
var pos;
var i;

var s = document.createElement("script");
s.src = chrome.extension.getURL("googleFearch.js");
(document.head || document.documentElement).appendChild(s);

// removing Index of portions

x = document.getElementsByClassName("r");

for (i = 0; i < x.length; i++) {
st = x[i].innerHTML;
pos = st.search("Index of /" || "Index of");
if (pos !== -1) {
x[i].innerHTML = st.replace(st.substring(pos, pos + 10), "");
}
}

// After loading and execution, the node disappears so no one can trace code.

s.onload = function () {
s.parentNode.removeChild(s);
};
2 changes: 1 addition & 1 deletion googleFearch.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
width: 385px;
text-align: center;
}

body {
min-width: 379px;
font-size: 100%;
Expand Down
8 changes: 4 additions & 4 deletions popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>

<head>
<title>music extension</title>
<title>Music extension</title>
<link href="popup.css" rel="stylesheet" type="text/css">
<script src="popup.js"></script>
</head>
Expand All @@ -26,7 +26,7 @@ <h1><span style="color:#4285f4">F</span><span style="color:#ea4335">e</span><spa
<tr>
<td>
<div id="searchWarning" style="display: none;">
&#9762 Please enter search query.
Please enter search query.
</div>
</td>
</tr>
Expand All @@ -52,15 +52,15 @@ <h1><span style="color:#4285f4">F</span><span style="color:#ea4335">e</span><spa
<tr>
<td>
<div id="checkboxWarning" style="display: none;">
&#9762 Please select one or more of the checkboxes.
Please select one or more of the checkboxes.
</div>
</td>
</tr>
<table>
</form>
</div>
<div id="footer">

</div>
</body>

</html>